summaryrefslogtreecommitdiff
path: root/server/handlers.py
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-16 16:10:59 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-16 16:10:59 +0200
commit251c5e2ba0e85103c55cf31026739b2e7e9d4b90 (patch)
treed01abacb559c69fdfe3ef205a683496533da8369 /server/handlers.py
parentb9f1c57fdd6097e776235c105c58c29f84399523 (diff)
Implement async. comm. with Python interpreter
Creating, destroying and communicationg with the interpreter subprocess is now handled by a thread attached to PythonSession. Interpreter is sandboxed using libseccomp.
Diffstat (limited to 'server/handlers.py')
-rw-r--r--server/handlers.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/server/handlers.py b/server/handlers.py
index fb50ff4..0cc474f 100644
--- a/server/handlers.py
+++ b/server/handlers.py
@@ -101,14 +101,6 @@ class Query(CodeqService):
request.reply(result)
-# Pull stdout/stderr from the session's Python interpreter. TODO: convert to async handling
-class PythonPull(CodeqService):
- def process(self, request):
- python = request.session.get_python()
- output = python.pull()
- request.reply({'code': 0, 'message': 'ok', 'terminal': {'text': output if output else ''}})
-
-
# Push stdin to the session's Python interpreter. TODO: convert to async handling
class PythonPush(CodeqService):
def process(self, request):
@@ -198,7 +190,6 @@ incoming_handlers = {
'activity': Activity(),
'query': Query(),
'python_push': PythonPush(),
- 'python_pull': PythonPull(),
'hint': Hint(),
'test': Test()
}