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.
___
python
>>> import os
>>> help(os.path.expanduser)
>>> import platform
>>> platform.system()
'Windows'
>>> platform.release()
'XP'
>>>
:-)
Dalius
--
http://mail.python.org/mailman/listinfo/python-list
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
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
On *nix, ~/foo refers to a file in a user's home directory. On
MSWindows, users normally look at "My Documents" in their home
directory. ISTM that a file that my program would put in ~/. on Linux
should be put in "~/My Documents/" (modulo os.path.normpath()) on
MSWindows, where a user would e