Hi,
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:
[color=blue][color=green][color=darkred]
>>> def a():[/color][/color][/color]
.... print "ciao"
....[color=blue][color=green][color=darkred]
>>> a()[/color][/color][/color]
ciao[color=blue][color=green][color=darkred]
>>> __builtins__.b = a
>>> b()[/color][/color][/color]
ciao[color=blue][color=green][color=darkred]
>>>[/color][/color][/color]
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?
Thank you
matteo merli
Comment