mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
14 lines
351 B
Python
14 lines
351 B
Python
|
import os
|
||
|
|
||
|
for subdir, dirs, files in os.walk('.'):
|
||
|
for file in files:
|
||
|
with open(file, 'r') as header:
|
||
|
htxt = header.read()
|
||
|
|
||
|
name = str.upper(file[4:-2])
|
||
|
print(name)
|
||
|
htxt = htxt.replace("FIX.", name)
|
||
|
print(htxt)
|
||
|
with open(file, 'w') as header:
|
||
|
header.write(htxt)
|