This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, georg.brandl, ncoghlan, paul.moore
Date 2012-09-10.16:04:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347293042.6.0.334060983539.issue15902@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-09-10 16:04:02brett.cannonsetrecipients: + brett.cannon, georg.brandl, paul.moore, ncoghlan
2012-09-10 16:04:02brett.cannonsetmessageid: <1347293042.6.0.334060983539.issue15902@psf.upfronthosting.co.za>
2012-09-10 16:04:02brett.cannonlinkissue15902 messages
2012-09-10 16:04:02brett.cannoncreate