100 % portable ?

Bernd Kaiser meldron at meldron.org
Mon Aug 23 09:55:49 CEST 2004

You can use os.environ["HOME"], this will return the user's home dir.

Roger Binns wrote:
> Note that for some things you would want different code.  For
> example the default location to save files may be My Documents
> on Windows and $HOME on Linux and Mac.  Similarly you would
> want to save configuration settings in the registry on Windows
> and dot files on Linux and Mac.

More information about the Python-list mailing list