Talin wrote: > -- A mechanism whereby imported modules can import > symbols from the module that imported them. (Specifically, > I want to take a bunch of variables in my __main__ module > and make them accessible to the imported module.)
In my_imported_module.py: import __main__ def my_stuff(): # do what you want with __main__.x etc. But be careful not to use from __main__ import foo at the top, because it's highly likely that foo won't have been defined yet when the module is imported. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com