parameter files

Russ uymqlp502 at
Thu Sep 14 01:26:57 CEST 2006

I have a python module (file) that has a set of parameters associated
with it. Let's say the module is called "" I would like to keep
the parameter assignments in a separate file so that I can save a copy
for each "run" without having to save the entire file. Let's
say the parameter file is called ""

Normally, would simply import the file. However,
I don't want the parameters to be accessible to any other file that
imports the file. to prevent such access, I preface the name of
each parameter with an underscore. But then the parameters aren't even
visible in! So I decided to use "execfile" instead of import so
the parameters are visible.

That solved the problem, but I am just wondering if there is a better
and/or more standard way to handle a situation like this. Any
suggestions? Thanks.

More information about the Python-list mailing list