Mercurial > hg > index.fcgi > www > www-1
comparison myrss/myrss_test_server.py @ 42:a1456ecd25b9
fix bug with threadpool; create WSGI app and test server; use logging
author | paulo |
---|---|
date | Mon, 04 Feb 2013 23:58:02 -0800 |
parents | |
children | df6a1a347584 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:939e7f156d9d |
---|---|
1 import wsgiref.simple_server | |
2 import SocketServer | |
3 | |
4 import myrss_parser | |
5 | |
6 | |
7 class ThreadingWSGIServer(SocketServer.ThreadingMixIn, wsgiref.simple_server.WSGIServer): | |
8 pass | |
9 | |
10 | |
11 if __name__ == "__main__": | |
12 httpd = ThreadingWSGIServer(('', 8000), wsgiref.simple_server.WSGIRequestHandler) | |
13 httpd.set_app(myrss_parser.MyRssApp()) | |
14 httpd.serve_forever() |