[Twisted-Python] What is the best way to install Twisted on OS X 10.4?

I'm having a hard time running a TwistedWords example. [OS X 10.4, MacPython 2.4, Python 2.3.5, latest stable build of TwistedSumo] I have installed (correctly I think) zopeinterfaces/core/words/web, but when I invoke: /usr/local/bin/python msn_example.py I get the following error: Traceback (most recent call last): File "msn_example.py", line 11, in ? from twisted.protocols import msn File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/protocols/msn.py", line 6, in ? globals()) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twisted/python/util.py", line 725, in moduleMovedForSplit raise ImportError("You need to have the Twisted %s " ImportError: You need to have the Twisted Words package installed to use twisted.protocols.msn. See http://twistedmatrix.com/projects/words. Your help is greatly appreciated [I'm a noob to Python and Twisted, but I know bit about OS X]. Thanks! Aaron.

Turns out there is a problem with the msn_example.py that is provided under the documentation section of the Words project. The import of msn is: from twisted.protocols import msn but should read: from twisted.words.protocols import msn AR. On 7/13/06, Aaron Rustad <arustad@gmail.com> wrote:

On 7/14/06, Aaron Rustad <arustad@gmail.com> wrote:
Strange that this would solve your problem, as twisted.protocol.msn is just a compatibility wrapper around twisted.words.protocols.msn. The error you got was to indicate that you actually didn't have words installed so it couldn't find twisted.words.protocols.msn. Did you use the toplevel setup.py file from the Twisted-2.4.0.tar.bz2? -- Christopher Armstrong International Man of Twistery http://radix.twistedmatrix.com/ http://twistedmatrix.com/ http://canonical.com/

On Fri, Jul 14, 2006 at 08:32:49AM -0600, Aaron Rustad wrote:
While the example should be updated to use the non-deprecated import, there seems to be a bug here. The only difference between these two statements should be that the first emits a warning. They should both work (or not) equally well. -Andrew.

On Sat, 15 Jul 2006 15:40:20 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
Fixed in trunk, see: http://twistedmatrix.com/trac/ticket/1637 http://twistedmatrix.com/trac/changeset/17455 Regards, Stephen Thorne.

OK, I finally got back on to my MacBook, made the change to msn_example.py, and it works. So, it turns out is wasn't a OS X/python issue at all. thanks everyone! AR. On 7/14/06, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Aaron Rustad wrote:
It may make your life generally easier to note that I've built a meta-package that includes all of twisted and zope, and pycrypto, and pyopenssl built for MacPython 2.4. I don't know what you may have messed up during the install (perhaps you used /usr/bin/python (which should point to 2.3) for the install.) But people seem pretty happy with my packages. http://dreid.org/twisted/Twisted-2.4.0_py2.4-KitchenSink.dmg - -David - -- "Usually the protocol is this: I appoint someone for a task, which they are not qualified to do. Then, they have to fight a bear if they don't want to do it." -- Glyph Lefkowitz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEt+dXrsrO6aeULcgRAgqcAJ9w05+bV7TG9crkxffiD0MvwReBqgCggQfw OhsLTFz8QeOxyPOGeml7LbM= =nvdi -----END PGP SIGNATURE-----

OK I shouldn't say that all my problems are solved on my Mac. I am using Cygwin at work and I went through the same process of installing Twisted, and Python (minus the MacPython of course), and I receieved the same errors that I indicated earlier in this thread. However, when I changed the import for msn on msn_example.py, it worked. I'll make the change at home on my MBP and let everyone know if it worked. Thanks! AR. On 7/14/06, David Reid <dreid@dreid.org> wrote:

Turns out there is a problem with the msn_example.py that is provided under the documentation section of the Words project. The import of msn is: from twisted.protocols import msn but should read: from twisted.words.protocols import msn AR. On 7/13/06, Aaron Rustad <arustad@gmail.com> wrote:

On 7/14/06, Aaron Rustad <arustad@gmail.com> wrote:
Strange that this would solve your problem, as twisted.protocol.msn is just a compatibility wrapper around twisted.words.protocols.msn. The error you got was to indicate that you actually didn't have words installed so it couldn't find twisted.words.protocols.msn. Did you use the toplevel setup.py file from the Twisted-2.4.0.tar.bz2? -- Christopher Armstrong International Man of Twistery http://radix.twistedmatrix.com/ http://twistedmatrix.com/ http://canonical.com/

On Fri, Jul 14, 2006 at 08:32:49AM -0600, Aaron Rustad wrote:
While the example should be updated to use the non-deprecated import, there seems to be a bug here. The only difference between these two statements should be that the first emits a warning. They should both work (or not) equally well. -Andrew.

On Sat, 15 Jul 2006 15:40:20 +1000, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:
Fixed in trunk, see: http://twistedmatrix.com/trac/ticket/1637 http://twistedmatrix.com/trac/changeset/17455 Regards, Stephen Thorne.

OK, I finally got back on to my MacBook, made the change to msn_example.py, and it works. So, it turns out is wasn't a OS X/python issue at all. thanks everyone! AR. On 7/14/06, Andrew Bennetts <andrew-twisted@puzzling.org> wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Aaron Rustad wrote:
It may make your life generally easier to note that I've built a meta-package that includes all of twisted and zope, and pycrypto, and pyopenssl built for MacPython 2.4. I don't know what you may have messed up during the install (perhaps you used /usr/bin/python (which should point to 2.3) for the install.) But people seem pretty happy with my packages. http://dreid.org/twisted/Twisted-2.4.0_py2.4-KitchenSink.dmg - -David - -- "Usually the protocol is this: I appoint someone for a task, which they are not qualified to do. Then, they have to fight a bear if they don't want to do it." -- Glyph Lefkowitz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEt+dXrsrO6aeULcgRAgqcAJ9w05+bV7TG9crkxffiD0MvwReBqgCggQfw OhsLTFz8QeOxyPOGeml7LbM= =nvdi -----END PGP SIGNATURE-----

OK I shouldn't say that all my problems are solved on my Mac. I am using Cygwin at work and I went through the same process of installing Twisted, and Python (minus the MacPython of course), and I receieved the same errors that I indicated earlier in this thread. However, when I changed the import for msn on msn_example.py, it worked. I'll make the change at home on my MBP and let everyone know if it worked. Thanks! AR. On 7/14/06, David Reid <dreid@dreid.org> wrote:
participants (5)
-
Aaron Rustad
-
Andrew Bennetts
-
Christopher Armstrong
-
David Reid
-
Stephen Thorne