Amir Dekel wrote:
2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties, non helped. I really have to fix this somehow.
Judging from this, I think that os.environ['USERPROFILE'] seems like it may do what you want, though os.environ['APPDATA'] might be useful as well. Of course, if you're trying to get something to work cross-platform, things may be more difficult -- but that's because Windows doesn't normally use ~ so its use is not supported very well. You may be able to create a $HOME that's equivalent to $USERPROFILE...
Yet another reason not to use Windows and all it's silly system... Unfotunely, I am stuck with a USB ADSL modem on a family computer, which led to terrible headaches with my (quiet successful, actually) attempts to install Linux.
Well, so be it... -- http://mail.python.org/mailman/listinfo/python-list