Saving Files Under Windows

Eddy Buhler ebuhler at gm-squared.de
Fri Jun 13 16:49:49 CEST 2003


Hi,

on Windows 9x, everything is under c:\windows for all users - those
"Pseudo"-OS's do not really support multiple users with separate (and
restricted to that user) user files etc.

On Windows NT, there is a profiles folder unter WINNT, and in Windows 2000
and XP you have c:\documents... (well, on systems with ENGLISH directory
names, at least...).

What I DO know is that unter Windows NT and Windows 2000 and Windows XP
alike you can use environment variables to determine the correct directory.

Try entering "set" in a shell/dos box, and you should somewhere find a
variable called "USERPROFILE" and similar ones directing you to the right
folders.

Windows 9x will probably have to be handled manually though, and since I do
not use these anymore, I cannot suggest anything great there.

SInce I am fairly new to Python, I can't from the top of my head tell you
the functions to evaluate environment variables, but my first guess would be
something in the os module, and my second guess would be in the sys module.

Hope that helps,
Eddy Buhler




More information about the Python-list mailing list