[Twisted-Python] Connecting to multiple servers

Antonio Beamud Montero antonio.beamud at gmail.com
Tue Jul 7 13:13:33 EDT 2009

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!"



For example with a global counter and when reach to 2, then reactor.stop()?

If I use reactor.connectTCP a Connector object is returned and no
deferred to work with... How do I know when the connection has finished?


More information about the Twisted-Python mailing list