Gerrat Rickert escribió:
>> Ok, but when I use reactor.connectTCP no deferred is returned.. How I
>> can stop the reactor when all connections has finished?
>>
>> Thanks.
>>
>
> ...it would be helpful if you provided an actual example
> (your example did not use a "reactor.connectTCP");
> but
>-Original Message-
>From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-
>boun...@twistedmatrix.com] On Behalf Of Antonio Beamud Montero
>Sent: Wednesday, July 08, 2009 4:42 AM
>To: Twisted general discussion
>Subject: Re: [Twisted-Python] Connecting t
Gerrat Rickert escribió:
> ...you could try this (slightly modified from your example):
>
> from twisted.internet import reactor, defer
> from twisted.web.client import getPage
>
> def gotPageCallback(page):
> print "got a page!"
>
> dlist = [getPage('http://www.google.com').addCallback(gotPag
>-Original Message-
>From: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-
>boun...@twistedmatrix.com] On Behalf Of Antonio Beamud Montero
>Sent: Tuesday, July 07, 2009 1:14 PM
>To: Twisted general discussion
>Subject: [Twisted-Python] Connecting to mult
Hi all:
What's the smart way to close the reactor and exit in an app like that:
-
from twisted.internet import reactor
from twisted.web.client import getPage
def gotPageCallback(page):
print "got a page!"
getPage('http://www.google.com').addCallback(gotPageCallback)