9 Dec
2003
9 Dec
'03
6:12 p.m.
Thanks Dennis. I dunno whether I'd call it simpler, but it would definitely be useful in some cases. It certainly is satisfying to take advantage of python's libraries to make a server-from-scratch when one is called for. =Pual At 12:47 PM 12/9/2003, you wrote:
There's another, simpler approach. Write a simple server and use it rather than Zope. YMMV depending upon your site configuration.
Something like this should do the job...
#!/usr/bin/env python2
import SimpleHTTPServer import SocketServer import StringIO <snip a lot> httpd = SocketServer.TCPServer(("", PORT), Handler ) print 'serving at port ', PORT httpd.serve_forever()