Access to main namespace from imported module?
Chris Liechti
cliechti at gmx.net
Mon Apr 1 14:53:09 EST 2002
Dale Strickland-Clark <dale at riverhall.NOTHANKS.co.uk> wrote in
news:re8haugrbcchbephckl9t1p1s27tvg18hr at 4ax.com:
> Just curious, like, but is it possible for an included module to
> reference the namespace of the outer-most module, "__main__".
just do an import
>>> import __main__
>>> __main__.var = 7
etc.
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list