Message220442
This leads to problems when using runpy, since it relies on pkgutil to find importers.
In Python 2, ImpLoader is used by ImpImporter which is used as fallback importer by get_importer(). get_importer() is used by runpy to implement e.g. the -m option. As a result, -m doesn't work with frozen modules.
In Python 3, ImpLoader still exists, but is deprecated. get_importer() also no longer falls back to the ImpImporter as default, so the situation is less bothersome.
Here's a patch for Python 3.4.1 which shows how to add support for frozen modules. The same patch also works in Python 2.6 and 2.7. |
|
Date |
User |
Action |
Args |
2014-06-13 14:08:31 | lemburg | set | recipients:
+ lemburg, eric.araujo, dstufft |
2014-06-13 14:08:31 | lemburg | set | messageid: <1402668511.45.0.703803525132.issue21749@psf.upfronthosting.co.za> |
2014-06-13 14:08:31 | lemburg | link | issue21749 messages |
2014-06-13 14:08:31 | lemburg | create | |
|