diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-09-04 16:57:17 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@araneo.org> | 2015-09-04 16:57:17 +0200 |
commit | a293cf9d5fd64ff29bc05daa80d2f9a3a8c0abe0 (patch) | |
tree | 3ab047f9bcd85dff3c12fee7c2a3d75cfe864962 /server | |
parent | c494a44b3c0e8faf77419c3cd5bef4da195e89c6 (diff) |
Add Python push&pull services to wsgi_server
Diffstat (limited to 'server')
-rw-r--r-- | server/python_session.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/python_session.py b/server/python_session.py index 161ba0d..4c4a781 100644 --- a/server/python_session.py +++ b/server/python_session.py @@ -28,6 +28,8 @@ class PythonSession(object): _m.connect() self._python = _m.Python() + self.create() + def run(self, code=None, inputs=None, timeout=1.0): with self._access_lock: return self._python.run(code, inputs, timeout) @@ -40,7 +42,7 @@ class PythonSession(object): def pull(self): with self._access_lock: if self._interpreter is None: - return 'Python is not running' + return None return self._python.pull(self._interpreter) def push(self, stdin): |