[issue27642] import and __import__() fails silently without a ImportError and does not add the module to the file's namespace.
Emanuel Barry
report at bugs.python.org
Thu Jul 28 08:21:04 EDT 2016
Emanuel Barry added the comment:
Yeah, just add 'global testplugin' at the top of your function, before your import it (you'll also need a global statement if you want to delete/re-import it). You might want to take a look at importlib if you wish to dynamically load modules (especially reloading them, which is a pain).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27642>
_______________________________________
More information about the Python-bugs-list
mailing list