[New-bugs-announce] [issue16027] pkgutil doesn't support frozen modules

Marc-Andre Lemburg report at bugs.python.org
Mon Sep 24 19:02:41 CEST 2012

New submission from Marc-Andre Lemburg:

pkgutil is used by runpy to run Python modules that are loaded via the -m command line switch.

Unfortunately, this doesn't work for frozen modules, since pkgutil doesn't know how to load their code object (this can be had via imp.get_code_object() for frozen modules).

We found the problem while working on eGenix PyRun (see http://www.egenix.com/products/python/PyRun/) which uses frozen modules extensively. We currently only target Python 2.x, so will have work around the problem with a patch, but Python 3.x still has the same problem.

components: Library (Lib)
messages: 171163
nosy: lemburg
priority: normal
severity: normal
status: open
title: pkgutil doesn't support frozen modules
versions: Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list