summaryrefslogtreecommitdiffstats
path: root/module/web/ServerThread.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-12-15 17:48:30 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-12-15 17:48:30 +0100
commit95d09b338ac7aed2b387bf143a5cfd1c4b29f612 (patch)
tree2f6c078f95bbc80f423609bacab8066fe86d7067 /module/web/ServerThread.py
parentgui queue view - unstable (non thread safe) (diff)
downloadpyload-95d09b338ac7aed2b387bf143a5cfd1c4b29f612.tar.xz
new Django webinterface(in development), small fixes
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