Anyone able to get the auto-complete for this script (Which works, got it
from the twisted book) to work? Or explain to me why it doesn't? Much
appreciated!

quick_connect.py
===============================================
from twisted.internet import reactor, protocol

class QuickDisconnectProtocol(protocol.Protocol):
   def connectionMade(self):
       print "Connected to %s" % self.transport.getPeer().host
       self.transport.loseConnection()

class BasicClientFactory(protocol.ClientFactory):
   protocol = QuickDisconnectProtocol

   def clientConnectionLost(self, connector, reason):
       print "Lost Connection %s" % reason.getErrorMessage()
       reactor.stop()

   def clientConnectionFailed(self, connector, reason):
       print "Connection failed %s" % reason.getErrorMessage()
       reactor.stop()

reactor.connectTCP('www.google.com', 80, BasicClientFactory())
reactor.run()
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to