where should config files go in Windows?
Russell E. Owen
rowen at cesmail.net
Wed Feb 4 14:17:35 EST 2004
In article <mailman.1140.1075749926.12720.python-list at python.org>,
"Mike C. Fletcher" <mcfletch at rogers.com> wrote:
>Russell E. Owen wrote:
>...
>
>>(essentially I asked where prefs and application-specific data go on Windows)
>>
>There are actually multiple directories for this kind of thing,
>depending on whether you're describing user's documents,
>application-specific data for the user (e.g. custom dictionaries),
>common application-specific data (app-specific system dictionaries),
>etceteras. You can see an example of retrieving the user's
>application-specific data directory here:
>
>http://cvs.sourceforge.net/viewcvs.py/pyopengl/OpenGLContext/browser/homedirect
>ory.py?view=markup
>
>using either of _winreg (standard module) or win32com's shell (common
>add-on, part of win32all).
>
>See the MSDN documentation for the various folders which are defined.
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfo
>rm/shell/reference/functions/shgetfolderpath.asp
Thank you very much! That's just what I wanted. I'll put preferences
<AppData>\TUIPrefs, optional user additions in <AppData>\TUIAdditions
and optional shared additions in <Common_AppData>\TUIAdditions. There
are equivalent standard directories on MacOS X (easily found; code
available on request). For unix I'll use ~/.TUIPrefs, ~/TUIAdditions and
(for lack of a better place), shared additions in
<tui_root>/TUIAdditions, where <tui_root> is the folder containing the
app's code.
-- Russell
More information about the Python-list
mailing list