a sample code
aleaxit at yahoo.com
Fri Jun 1 10:17:12 CEST 2001
"Abel" <x at x.com> wrote in message news:9f7dki$29n$1 at diana.bcn.ttd.net...
> I'm looking for a sample of code of a simple HTTP Server in Python.(i want
> just the basic code)
> Where can I find it ?
d:\Python21\Lib\SimpleHTTPServer.py, if d:\Python21 is the directory
to which you have installed Python 2.1 (adjust accordingly if you
have installed it elsewhere:-). You'll need to also look at the
class used as the base for class SimpleHTTPRequestHandler defined
in that source file, of course -- so, see Lib\BaseHTTPServer.py,
and you'll see that, in turn, subclasses stuff from the SocketServer.py
source in the same directory. I consider this setup in the Python
library an EXCELLENT simple example of object-oriented design, btw.
More information about the Python-list