New submission from Sebastian Rittau: It was very easy to load plugin files in Python 2:
import imp my_module = imp.load_source("what.ever", "foo.py") Unfortunately, this became much more obscure in Python 3.3: import importlib.machinery loader = importlib.machinery.SourceFileLoader("what.ever", "foo.py") my_module = loader.load_module("what.ever") In Python 3.4 even this has been deprecated. There should be a way (preferable an easy-to-use one) to load a Python module by filename or by stream. ---------- components: Library (Lib) messages: 217919 nosy: srittau priority: normal severity: normal status: open title: bring back importlib.load_source() et al. type: enhancement versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com