Mercurial > hg > index.fcgi > www > www-1
diff pics2/pics_test_server.py @ 52:f5c2934a1e3f
add pics2
author | paulo |
---|---|
date | Tue, 14 May 2013 23:36:18 -0700 |
parents | |
children | 0249782e231e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pics2/pics_test_server.py Tue May 14 23:36:18 2013 -0700 1.3 @@ -0,0 +1,14 @@ 1.4 +import wsgiref.simple_server 1.5 +import SocketServer 1.6 + 1.7 +import pics_app 1.8 + 1.9 + 1.10 +class ThreadingWSGIServer(SocketServer.ThreadingMixIn, wsgiref.simple_server.WSGIServer): 1.11 + pass 1.12 + 1.13 + 1.14 +if __name__ == "__main__": 1.15 + httpd = ThreadingWSGIServer(('', 8000), wsgiref.simple_server.WSGIRequestHandler) 1.16 + httpd.set_app(pics_app.app) 1.17 + httpd.serve_forever()