HTTP Server Root Folder

Steve Holden steve at
Tue Sep 5 15:42:35 CEST 2006

placid wrote:
> Hi All,
> I have this BaseHTTPServer.HTTPServer that is located at C:\ (im on
> Windows XP), when i run the program (httpserver.pyw) from the Run
> Dialog as "C:\httpserver.pyw" the root folder ("\") for http server is
> C:\, but when i add an entry to Registry Run so that it runs at boot
> time, the root folder becomes "C:\Documents and Settings\<username>" ?
> Does anyone know what the problem is?
Yes. Rather obviously, these two different ways of running programs 
assert different working directories for the program.

A simple way around this would be to have your program make an 
os.chdir() call to ensure the correct working directory before it starts 
the server.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list