The Python Way for module configuration?
no.email at please.post
Sat Jun 27 22:31:29 CEST 2009
[PYTHON NOOB ALERT]
I want to write a module that serves as a Python front-end to a
database. This database can be either in the form of tab-delimited
flat files, XML files, or a PostgreSQL server. The module is meant
to hide these database implementation details from its users.
But, minimally, the module needs to have some configuration details
to know where to get the data. There are many ways to provide this
configuration data to the module, but I would like to know what's
considered "best practice" for this type of problem in the Python
Ideally, I'm looking for a system that is unobtrusive under normal
operations, but easy to override during testing and debugging.
I would appreciate your comments and suggestions.
More information about the Python-list