Re: os.path.expanduser('~/foo') and MSWindows "My Documents"

2005-11-18 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > python > > >>> import os > >>> help(os.path.expanduser) > >>> import platform > >>> platform.system() > 'Windows' > >>> platform.release() > 'XP' > >>> platform looks good. ___

Re: os.path.expanduser('~/foo') and MSWindows "My Documents"

2005-11-18 Thread dalius . dobravolskas
python >>> import os >>> help(os.path.expanduser) >>> import platform >>> platform.system() 'Windows' >>> platform.release() 'XP' >>> :-) Dalius -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.expanduser('~/foo') and MSWindows "My Documents"

2005-11-17 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Try this: > > > from win32com.shell import shell, shellcon > HOMEDIR = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_PERSONAL) > myfile_location = os.path.join(HOMEDIR, myfile_name) > > Define a HOMEDIR for your various platforms (use

Re: os.path.expanduser('~/foo') and MSWindows "My Documents"

2005-11-17 Thread jim . mccoy
Try this: from win32com.shell import shell, shellcon HOMEDIR = shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_PERSONAL) myfile_location = os.path.join(HOMEDIR, myfile_name) Define a HOMEDIR for your various platforms (use sys.platform to figure out what choice to make) and the rest of your code