cross platform application configuration files
missive at frontiernet.net
Fri Feb 28 14:37:24 CET 2003
I am writing a game library on top of python and pygame
( http://www.nongnu.org/pygsear/ ) and I want to store some
application defaults somewhere....
I work mostly on FreeBSD, so I would tend to create a file for
my application ~/.pygsear and store app configuration there.
Of course there are other platforms *cough* etc *cough* where
that makes no sense.
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?
More information about the Python-list