We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44b8fe7 commit 7ac1bdbCopy full SHA for 7ac1bdb
bin/PyServer1.0.py
@@ -4,15 +4,20 @@
4
from io import StringIO
5
from contextlib import redirect_stdout
6
from traceback import format_exc
7
-import sys
8
-value = {}
+import sys,os
+
9
10
@app.route("/")
11
def main():
12
if request.args.get("code") == None:
13
return "PyWimVBA server, this does nothing"
14
elif request.args.get("code") == "$clear":
- sys.modules[__name__].__dict__.clear()
15
+ for n in dir():
16
+ if n[0]!='_': delattr(sys.modules[__name__], n)
17
return "Cleared"
18
+ elif request.args.get("code") == "$exit":
19
+ own_pid = os.getpid()
20
+ os.kill(own_pid, 9)
21
else:
22
cpde = request.args.get("code")
23
f = StringIO()
0 commit comments