Can module access global from __main__?

Neal Becker ndbecker2 at
Tue Oct 11 15:38:04 CEST 2005

Suppose I have a main program, e.g.,  In we have:

X = 2
import B

Now B is a module  In B, how can we access the value of X?

More information about the Python-list mailing list