Mercurial > hg > index.fcgi > www > www-1
comparison myrss/myrss_test_server.py @ 129:bd8a61f9162f
myrss2: add San Mateo Daily Journal to FEEDS
author | paulo |
---|---|
date | Tue, 11 Jan 2022 02:36:16 -0800 |
parents | a1456ecd25b9 |
children |
comparison
equal
deleted
inserted
replaced
0:939e7f156d9d | 1:ad337874e8cd |
---|---|
1 import wsgiref.simple_server | 1 import wsgiref.simple_server |
2 import SocketServer | 2 import SocketServer |
3 | 3 |
4 import myrss_parser | 4 import myrss_app |
5 | 5 |
6 | 6 |
7 class ThreadingWSGIServer(SocketServer.ThreadingMixIn, wsgiref.simple_server.WSGIServer): | 7 class ThreadingWSGIServer(SocketServer.ThreadingMixIn, wsgiref.simple_server.WSGIServer): |
8 pass | 8 pass |
9 | 9 |
10 | 10 |
11 if __name__ == "__main__": | 11 if __name__ == "__main__": |
12 httpd = ThreadingWSGIServer(('', 8000), wsgiref.simple_server.WSGIRequestHandler) | 12 httpd = ThreadingWSGIServer(('', 8000), wsgiref.simple_server.WSGIRequestHandler) |
13 httpd.set_app(myrss_parser.MyRssApp()) | 13 httpd.set_app(myrss_app.MyRssApp()) |
14 httpd.serve_forever() | 14 httpd.serve_forever() |