[EMAIL PROTECTED] wrote:
> I'm working on an app that will be deployed on several different
> servers.  In each case, I'll want to change some config info (database
> name, paths, etc.)
>
> In perl, I would have done something like this:
>
>   Package Config;
>   <some exporting mechanics>
>   $dbname = "somename";
>   etc.
>

Create a python module that defines the variables you want, and then
import it (or from it).

You can then edit that module as a config file.

That's one suggestion - with the security risks associated with an
import statement...

Alternatively, my usual reccomendation for a config file reader is
ConfigObj... ;-)

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to