Path ... where is my application's home dir?

Michael Geary Mike at DeleteThis.Geary.com
Wed Apr 28 18:04:23 EDT 2004


Roger Binns wrote:
> from win32com.shell import shell, shellcon
> path=shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, None, 0)

CSIDL_PERSONAL is the user's "My Documents" folder, which is not the right
place for configuration files. It's for documents that the user explicitly
creates and saves.

Configuration files generally belong in a subdirectory under CSIDL_APPDATA.
Large data files that shouldn't be uploaded and downloaded when roaming
profiles are used belong in a subdirectory under CSIDL_LOCAL_APPDATA. On
systems that don't support CSIDL_LOCAL_APPDATA, fall back to CSIDL_APPDATA
instead.

-Mike





More information about the Python-list mailing list