summaryrefslogtreecommitdiffstats
path: root/module/web/ServerThread.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/ServerThread.py')
-rw-r--r--module/web/ServerThread.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py
new file mode 100644
index 000000000..803dc5dc5
--- /dev/null
+++ b/module/web/ServerThread.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import threading
+import os
+from os.path import join
+
+class WebServer(threading.Thread):
+ def __init__(self, pycore):
+ threading.Thread.__init__(self)
+ self.pycore = pycore
+ self.setDaemon(True)
+
+ def run(self):
+ self.pycore.logger.info("Starting Webserver @ Port 8000")
+ os.system("python " + join(self.pycore.path,"module","web","manage.py runserver"))
+ #@TODO: really bad approach, better would be real python code, or subprocess \ No newline at end of file