16 lines
485 B
Python
16 lines
485 B
Python
import ast
|
|
code = open("compiler/target.py", 'r')
|
|
code = code.read()
|
|
name = input("name: ")
|
|
type = int(input("typ: "))
|
|
args = int(input("args amount: "))
|
|
out = {type: {"name": name, "code": code, "args": args}}
|
|
combinations = open("combinations.txt", 'r')
|
|
combinations = combinations.read()
|
|
combinations = ast.literal_eval(combinations)
|
|
for i in out:
|
|
combinations[i] = out[i]
|
|
file = open("combinations.txt", 'w')
|
|
file.write(str(combinations))
|
|
file.close()
|
|
print(out) |