[Tutor] BaseHTTPServer module

Michael P. Reilly arcege@shore.net
Tue, 6 Feb 2001 19:27:02 -0500 (EST)


> A newbie question on the included module BaseHTTPServer:
> What is the root directory? that I put the pages for it to display?
> thanks, ~Dustin

The BaseHTTPServer doesn't serve files, it is just a framework for
creating a server.  You want to be looking at SimpleHTTPServer.  The
default root directory is the program's current directory; but you can
change that by overriding the "translate_path" method of the
SimpleHTTPRequestHandler class.

Before you call the server process (or just the server instance's
"serve_forever" method), you would want to change to the directory
containing your HTML files.

  -Arcege

-- 
------------------------------------------------------------------------
| Michael P. Reilly, Release Manager  | Email: arcege@shore.net        |
| Salem, Mass. USA  01970             |                                |
------------------------------------------------------------------------