Move operator infos to Core_Ctx

This commit is contained in:
Krzosa Karol
2023-01-01 16:14:47 +01:00
parent 34928e3977
commit d441abcddb
5 changed files with 153 additions and 172 deletions

View File

@@ -3,9 +3,10 @@ import sys
import os
files = os.listdir(".")
files = [i for i in files if (i.endswith(".cpp") or i.endswith(".h")) and i != "base_unicode.cpp"]
files = [i for i in files if (i.endswith(".cpp") or i.endswith(".h")) and i != "test.cpp"]
for file_to_modify in files:
print(file_to_modify)
fd = open(file_to_modify, "r+")
f = fd.read()
END = "/*END*/"
@@ -49,7 +50,7 @@ for file_to_modify in files:
with open(temp_filename, "w") as meta_file:
meta_file.write(program)
result = subprocess.run(["py", temp_filename], stdout=subprocess.PIPE)
result = subprocess.run([sys.executable, temp_filename], stdout=subprocess.PIPE)
program_result = result.stdout.decode('utf-8').replace('\r\n', '\n') + END
f = before + program + "*/\n" + program_result + after
os.remove(temp_filename)