Message255901
Python 3.5 lets you do:
spec = importlib.util.spec_from_file_location('what.ever', 'foo.py')
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
I am satisfied that case for loading from a file is easy enough to not warrant keeping load_module() around just for this use case. |
|
Date |
User |
Action |
Args |
2015-12-04 23:56:46 | brett.cannon | set | recipients:
+ brett.cannon, srittau, ncoghlan, Arfrever, Claudiu.Popa, eric.snow, Borisd13, martin.panter, nikicat |
2015-12-04 23:56:46 | brett.cannon | set | messageid: <1449273406.42.0.0745844453097.issue21436@psf.upfronthosting.co.za> |
2015-12-04 23:56:46 | brett.cannon | link | issue21436 messages |
2015-12-04 23:56:46 | brett.cannon | create | |
|