[Twisted-Python] newbe twisted xmpp load

Wrene Robyn wrobyn at cox.net
Sat Mar 10 07:24:49 MST 2007


That throws an error if I import pollreactor in my code, then jid  
tries to import reactor, days there is already an instance or something

On Mar 9, 2007, at 4:52 PM, Jean-Paul Calderone wrote:

> On Fri, 9 Mar 2007 16:34:47 -0500, Wrene Robyn <wrobyn at cox.net> wrote:
>> and for some reason from twisted.words.protocols.jabber.jid
>> imports reactor but doesnt use it as far as I can tell, that  
>> caused  the below code to fail if you imported pollreactor.
>> Still would love to see an example of the below code converted to  
>> use pollreactor
>
> Easy, just import pollreactor first.
>
>>
>> On Mar 9, 2007, at 7:04 AM, Wrene Robyn wrote:
>>> Hi,
>>> Yes I am on os X. Could you show me how to convert my code below  
>>> to  use poll? Thanks!
>
> from twisted.internet import pollreactor
> pollreactor.install()
>
>>> [mport sys
>>> import socket
>>> import time
>>> import resource
>>> from threading import Thread
>>> from twisted.words.protocols.jabber import client, jid
>>> from twisted.words.xish import domish
>>> from twisted.internet import reactor
>>>
>>> [snip]
>
> Jean-Paul
>
> _______________________________________________
> 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