diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-12-15 17:48:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-12-15 17:48:30 +0100 |
commit | 95d09b338ac7aed2b387bf143a5cfd1c4b29f612 (patch) | |
tree | 2f6c078f95bbc80f423609bacab8066fe86d7067 /module/web/ServerThread.py | |
parent | gui queue view - unstable (non thread safe) (diff) | |
download | pyload-95d09b338ac7aed2b387bf143a5cfd1c4b29f612.tar.xz |
new Django webinterface(in development), small fixes
Diffstat (limited to 'module/web/ServerThread.py')
-rw-r--r-- | module/web/ServerThread.py | 15 |
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 |