Adding objects to __builtins__
matteo.merli at studenti.unipr_punto_it
Wed Jun 2 19:34:01 CEST 2004
is there a way to save objects in the __builtins__ namespace?
the goal is to make them available in all the modules of my app, without
reimporting all the things and keep references...
The curious thing is that when i try from the interactive interpreter the
thing just works:
>>> def a():
... print "ciao"
>>> __builtins__.b = a
But i've tried inside a script, recalling objects from other imported
modules, they cannot see them.
Does exist a way to do this, or is just a stupid thing?
More information about the Python-list