OS independent files

Jarek Zgoda jzgoda at o2.usun.pl
Thu Aug 3 15:58:30 EDT 2006


Tim Chase napisał(a):

> Well, there in os.path you'll find expanduser() so you can do things like
> 
>>>> homedir = os.path.expanduser("~")
>>>> filename = os.path.join(homedir, "myfiles", "myfile.dat")
> 
> Seems to work well for me.

On Windows, this is consistent between releases (i.e. you'll end up
elsewhere on W2k Pro, W2k Server, Win XP and W2003).

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list