> "PN" == Pekka Niiranen <[EMAIL PROTECTED]> writes:
PN> Hi there,
PN> I have two scripts. The first "main.py" sets some variables
PN> and then imports another called "gen.py". The idea is to
PN> provide "main.py" that defines some paths, variables etc.
PN> without using Windows environment va
In main.py, execfile("gen.py")
or
In gen.py, have something like
from __main__ import env_params
or
In main.py, have something like
import __builtins__; __builtins__.env_params = env_params
or
call a function in the gen.py with env_params as a parameter
import gen
gen.do(env_p
Thanks,
I will analyse these 4 options and select the most suitable
since there are other issues involved too, like
"the "main.py" reads contents of a file to a list that gets
passed to the "gen.py" with dictionary "env_params"".
I try to avoid parsing the contents of the file both
in "main.py" an