OS independent files
Jarek Zgoda
jzgoda at o2.usun.pl
Thu Aug 3 15:55:21 EDT 2006
crystalattice napisał(a):
> If I want to make sure the file/directory is made in a user's home
> directory (e.g. /home/users/path/to/file) but also compatible w/
> Windows, how would I rewrite this (if required)?
On Windows, there's no notion of user's home directory, there is a
directory for user's profile that is treated as $HOME but isn't
(%USERPROFILE%), something that looks like $HOME, bot in fact is not
(%HOMEDRIVE% + %HOMEPATH%) and many other mess. Microsoft suggests using
%USERPROFILE%, but they do not specify desired behaviour, when
%USERPROFILE% == c:\.
--
Jarek Zgoda
http://jpa.berlios.de/
More information about the Python-list
mailing list