execfile then import back

overly.crazy.steve at gmail.com overly.crazy.steve at gmail.com
Fri Jun 2 02:35:03 CEST 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