Message217919
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. |
|
Date |
User |
Action |
Args |
2014-05-05 12:00:08 | srittau | set | recipients:
+ srittau |
2014-05-05 12:00:08 | srittau | set | messageid: <1399291208.69.0.802643633069.issue21436@psf.upfronthosting.co.za> |
2014-05-05 12:00:08 | srittau | link | issue21436 messages |
2014-05-05 12:00:08 | srittau | create | |
|