Re: [Twisted-Python] Connecting to multiple servers

2009-07-08 Thread Antonio Beamud Montero
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

Re: [Twisted-Python] Connecting to multiple servers

2009-07-08 Thread Gerrat Rickert
>-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

Re: [Twisted-Python] Connecting to multiple servers

2009-07-08 Thread Antonio Beamud Montero
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

Re: [Twisted-Python] Connecting to multiple servers

2009-07-07 Thread Gerrat Rickert
>-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

[Twisted-Python] Connecting to multiple servers

2009-07-07 Thread Antonio Beamud Montero
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)