[Twisted-Python] Trying to get twisted.protocols.amp to work with py2app...

Petr Mifek pm-twisted-python at anapol.cz
Tue Mar 4 05:08:58 MST 2008


Hi,

took a quick look into the OS X 10.5 default twisted installation and 
indeed, there doesn't seem to be the amp.py module included in

/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/protocols

Try http://twistedmatrix.com/trac/wiki/Packages#Leopard

-p

glyph at divmod.com napsal(a):
> 
> On 04:11 am, nathan.stocks at gmail.com wrote:
>> I'm on a MacBook Pro running OS X 10.5.2 using py2app installed with
>> the "easy" method in the py2app install docs.  I'm trying to package a
>> little pyglet+twisted (pyglet.org, twistedmatrix.com) project that I'm
>> working on, and it _mostly_ works, except it keeps giving me the
>> following error when I try to run the resulting app:
>>
>> ImportError: No module named amp
> 
> AMP itself isn't doing anything clever that I can see would confuse 
> py2app.  It's just a regular Python module with regular imports; no 
> dynamic module loading; in fact, it's much less interesting than the 
> core parts of Twisted which load various plugins.
> 
> I don't have any experience with py2app, but I can guess at the problem 
> - I know that OS X 10.5 ships with an incomplete installation of Twisted 
> in some system location.  Perhaps you've installed a complete version of 
> Twisted elsewhere, but py2app is confused about the ordering of sys.path 
> that you want, and is including the system location first.  I am not 
> aware of how this installation is incomplete - maybe it doesn't include 
> AMP?
> 
> However, this is only a vague understanding, I don't have a MacOS Python 
> environment readily available to test with.  Twisted might actually be 
> packaged inside one of Apple's application, not on the system path, so 
> this could be a red herring.  Good luck investigating though, and please 
> let us know your results when you discover what's going on!
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list