execfile then import back

overly.crazy.steve at gmail.com overly.crazy.steve at gmail.com
Thu Jun 1 20:35:03 EDT 2006


> ########## x.py and y.py (they are identical) ##########
> import testexec
> print "1:", v, testexec.v
> testexec.v = 7

Oops, testexec should be changed to t instead. That is:

########## x.py and y.py (they are identical) ##########
import t
print "1:", v, t.v
t.v = 7




More information about the Python-list mailing list