AK Eric a écrit :
2/ in Python, "global" really means "module-level" - there's nothing like a "true" global namespace.Isn't that __main__?
Nope
import __main__ __main__.foo = "asdfasdf" print foo # asdfasdf Not advocating, but it does serve the purpose.
This won't make 'foo' available to other imported modules. Still a module-level name, and still no "true" global namespace - which FWIW is a VeryGoodThing(tm).
-- http://mail.python.org/mailman/listinfo/python-list