Commit 48af3786 authored by wanliofficial's avatar wanliofficial

update

parent 3fea3144
...@@ -59,13 +59,21 @@ class ApiManager(object): ...@@ -59,13 +59,21 @@ class ApiManager(object):
def get_escape_text(self, data): def get_escape_text(self, data):
fname = "./a.c" fname = "./a.c"
with open("./a.c", "w+") as f: target = os.sep.join(["out", fname])
if os.path.exists(fname):
os.remove(fname)
if os.path.exists(target):
os.remove(target)
with open(fname, "w+") as f:
f.write(data['string']) f.write(data['string'])
result = os.system("./opqcp {i} ./out".format(i=fname)) result = os.system("./opqcp {i} ./out".format(i=fname))
print(result) print(result)
with open("./out/a.c") as f: with open(target) as f:
result = f.read() result = f.read()
return result return result
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment