Passing options around your program

jeffshannon at gmail.com jeffshannon at gmail.com
Sun May 7 16:36:55 EDT 2006


When I have done this, I've used the last option -- creating a "config"
module which can be imported wherever the configuration info is needed.
 (This module also handles any config files and/or Windows registry
keys needed.)  Using a Borg is a nice idea... but that ConfigBorg is
probably going to be in its own module, which will need to be imported
anyhow... so why not let sys.__import__() do your singleton-enforcement
for you?

Of course, I hesitate to claim anything that I do as being necessarily
related to "best practices", but what would Usenet be without swarms of
half-informed opinions? ;)

Jeff Shannon




More information about the Python-list mailing list