daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Oct 23rd, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2. import os
  3.  
  4. files = [
  5.  
  6. ]
  7.  
  8. for f in files:
  9.     cwd = os.getcwd()
  10.     path = os.path.dirname(f)
  11.  
  12.     op = ""
  13.  
  14.     for s in range(path.count("/")+1):
  15.       op = os.path.join(op, os.pardir)
  16.  
  17.     import fileinput
  18.  
  19.     for line in fileinput.input(f, inplace = 1):
  20.       output = line.replace("const logger = require('winston');", "const { logger } = require('%s/lib/logger')" % (op))
  21.       output = output.rstrip()
  22.       print(output)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top