cross platform application configuration files
missive at frontiernet.net
Fri Feb 28 20:01:16 CET 2003
In article <pnav5vg94akp25g3hkg52ui6m3hepcbg04 at 4ax.com>:
> On Fri, 28 Feb 2003 13:37:24 -0000, rumours say that Lee Harr
><missive at frontiernet.net> might have written:
>>I really have no desire to learn the intricacies of using
>>the registry, but if there were a module already built where
>>I might say:
>>xpconf.store('pygsear', 'WINWIDTH', 800)
>>xpconf.store('pygsear', 'WINHEIGHT', 600)
>>WINWIDTH = xpconf.get('pygsear', 'WINWIDTH')
>>WINHEIGHT = xpconf.get('pygsear', 'WINHEIGHT')
>>and it would just "do the right thing" for the platform,
>>I might be convinced to use that...
>>Does such a beastie exist?
> Check this:
> (it's not only 2.3a2, I just happened to be browsing the latest
That is interesting.
I also got (in the email) a suggestion to use XML.
My question, though, is more about where to put the file,
and how to find it again on any platform.
I think maybe this is related to the question of where to put
module-specific data like images. That is easier though, since
they _can_ be placed in the lib directory during the installation
of the package (I am not saying that is the right place, only
that it is what I have seen done, and what I do).
More information about the Python-list