[Pythonmac-SIG] py2app ImportError

Ronald Oussoren ronaldoussoren at mac.com
Tue Feb 6 20:39:56 CET 2007

On 6 Feb, 2007, at 10:35, Erwin Marsi wrote:

> On Feb 6, 2007, at 10:23, Ronald Oussoren wrote:
>> How does ielemtree import ElementTree? Does it use an import  
>> statement or does it call __import__ directly? py2app can only  
>> detect imports that are done using the import statement.
>> Ronald
> It uses a normal import statement:
> from xml.etree.cElementTree import ElementTree

I found the problem, xml.etree.cElementTree imports _elementtree, a C  
extension. That extension does a number of imports from C which  
py2app doesn't know about and cannot find out about automaticly.

I've checked in a fix, if you upgrade modulegraph to the current  
trunk all should be fine ("easy_install-2.5 modulegraph==dev").


More information about the Pythonmac-SIG mailing list