Odisej / scripts /fix_paths.py
Nerdur's picture
🔄 Sync batch 6/7: code + text files from GitHub
cc97dd8 verified
Raw
History Blame Contribute Delete
280 Bytes
import fileinput
import sys
# Read app.py and replace the BASE_DIR line
for line in fileinput.input('app.py', inplace=True):
if line.startswith('BASE_DIR = '):
print('BASE_DIR = os.path.dirname(os.path.abspath(__file__)) + "/"')
else:
print(line, end='')