New submission from Stefan Seefeld <ste...@seefeld.name>:

I'm trying to import custom scripts that expect the presence of certain 
variables in the global namespace.
It seems `__import__('script', globals=dict(foo='bar'))` doesn't have the 
expected effect of injecting "foo" into the namespace and making it accessible 
to the script being loaded.

Is this a bug in `__import__` or am I missing something ? If the behaviour is 
expected, how can I achieve the desired behaviour ?

----------
components: Interpreter Core
messages: 366160
nosy: stefan
priority: normal
severity: normal
status: open
title: __import__ doesn't honour globals
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to