What's the best way to use python-syntax config files (in python of course)?

Posted by Gabe on Stack Overflow See other posts from Stack Overflow or by Gabe
Published on 2010-05-20T14:02:49Z Indexed on 2010/05/20 14:20 UTC
Read the original article Hit count: 177

Filed under:
|
|
|

My config file is really just a big python dict, but I have many config files to run different experiments and I want to 'import' a different one based on a command line option. Instinctively I want to do import ConfigFileName where ConfigFileName is a string with the config file's python package name in it... but that doesn't work.

Any ideas?

© Stack Overflow or respective owner

Related posts about python

Related posts about config