Making computer into server for free

François Pinard pinard at iro.umontreal.ca
Tue Jul 9 07:52:34 EDT 2002


[Comcol]

> Python does have SimpleHTTPServer and CGIHTTPServer which may be of use
> to you - see the global module index for more info. I've never used them
> myself, so I don't know how good they are or whether they're suitable
> for your purposes.

I used them and they well prove the concept they advance.  You can get
a working server in minutes (a dozen lines), which does a fair amount of
good job.

However, in real practice, you should use them as starting points, and
modify them a bit: 1) to correct a few tiny bugs, 2) to add some elementary
facilities (like CGI scripts in GET mode, or some authentication), and 3)
to customise the behaviour along your own habits or desires.  These will
extend the initial minutes into a few days. :-)

My opinion is that 1) and 2) improvements should nicely go in Python
distributions.  (Oh, I would have submitted these if "they" only had a
sensible mean for receiving bug reports -- like plain emails, or at the
very least, a bug tracker offering a reasonable email interface!)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list