You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
680 B

import sys
if __name__ == "__main__":
projectsetting = sys.argv[1]
enable = sys.argv[2]
if enable == "true":
sys.exit()
flag = False
newData = ""
print("start delete define")
with open(projectsetting, 'r') as f:
for line in f:
if flag ==True and (";USE_LOGWRAPPER" in line) and ("7" in line):
print("delete define")
line = line.replace(";USE_LOGWRAPPER","")
if "scriptingDefineSymbols:" in line:
flag = True
print("already delete")
newData += line
with open(projectsetting,"w",encoding="utf-8") as f:
f.write(newData)