O
Opinder
Hi,
For the Python experts out there:
Are there any side effects in assigning new variables to the
__builtins__ module for the purpose of exposing variables to imported
modules.
For example.
#/ main file
class Test: pass
mytest = Test() #/ instance of a class
__builtins__.mytest = mytest
import abc
#/ -----------------------
#/ This is the abc.py module file
#/ This should work because of the __builtins__ above
print mytest
Thanks.
For the Python experts out there:
Are there any side effects in assigning new variables to the
__builtins__ module for the purpose of exposing variables to imported
modules.
For example.
#/ main file
class Test: pass
mytest = Test() #/ instance of a class
__builtins__.mytest = mytest
import abc
#/ -----------------------
#/ This is the abc.py module file
#/ This should work because of the __builtins__ above
print mytest
Thanks.