How to save initial configuration? (program installation)

kyosohma at gmail.com kyosohma at gmail.com
Mon Jun 25 12:14:19 EDT 2007


On Jun 25, 10:58 am, Jason Zapman II <zapman... at gmail.com> wrote:
> On Jun 25, 11:37 am, Steve Holden <s... at holdenweb.com> wrote:
>
> > The traditional choices are the registry for Windows, and the /etc
> > subtree for the various, almost uncountable, flavors of Unix and
> > nixalikes. You're right, it's much more difficult per-system than
> > per-user, since there are so many conventions.
>
> I forgot to mention that this is for Unix environments, so the
> registry isn't an option, unfortunately (never thought I'd say
> that... ;-) ).
>
> Is there anything in the distutils.* stuff that would be useful?  This
> isn't going to be a python package (it's a standalone program).
>
> --Jason

Well, I don't know what your user file does, but couldn't you create
a .ini type file to hold the user's choice for the other file's
location and save the ini to the current working directory?

Something like this:

<ini file>
usersChosenPath = /usr/Path/to/Config
</ini file>

Kind of redundant, but I would think it would still work.

Mike




More information about the Python-list mailing list