Message170198
Well, that's extremely annoying as that doesn't work for .py or .pyc files::
>>> import imp
>>> stuff = imp.find_module('blah')
>>> stuff
(<_io.TextIOWrapper name=4 mode='U' encoding='utf-8'>, 'blah.py', ('.py', 'U', 1))
>>> stuff[0].close()
>>> imp.load_module('blah', None, 'blah.py', stuff[2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: file object required for import (type code 1)
I really hate these functions. |
|
Date |
User |
Action |
Args |
2012-09-10 16:04:02 | brett.cannon | set | recipients:
+ brett.cannon, georg.brandl, paul.moore, ncoghlan |
2012-09-10 16:04:02 | brett.cannon | set | messageid: <1347293042.6.0.334060983539.issue15902@psf.upfronthosting.co.za> |
2012-09-10 16:04:02 | brett.cannon | link | issue15902 messages |
2012-09-10 16:04:02 | brett.cannon | create | |
|