Help on object scope?
Duncan Booth
duncan.booth at invalid.invalid
Mon Feb 26 06:49:34 EST 2007
"Diez B. Roggisch" <deets at nospam.web.de> wrote:
> You can interact just fine, just qualify the objects with the module
> names. So in q, you need to use p.r instead of just r.
No. When p.py is being run as a script, the module you need to access is
__main__.
Much better to put the globals into a separate module created specifically
to hold the global variables rather than having them in something which
might or might not be the main script.
More information about the Python-list
mailing list