SimpleHTTPServer, queries unhandled?

Kartic kartic.krishnamurthy at gmail.com
Mon Dec 27 12:12:32 EST 2004


Try this in IDLE:

import CGIHTTPServer
CGIHTTPServer.test()

This starts serving right away. You can also look at CGIHTTPServer.py
in your Python/Lib to see how test() has been implemented.

test() starts serving from the current directory (of running python).
If you create a folder called cgi-bin and put a testcgi.py, this module
executes the .py file and displays the contents in the browser :-)
Thanks,
--Kartic
PS: You can handle query strings accordingly now.




More information about the Python-list mailing list