Thank you, It works Twisted is so simple ! :-) Joël
Le Thu, 7 Feb 2013 11:19:42 -0500 Itamar Turner-Trauring <[email protected]> a écrit : > On Wed, Feb 6, 2013 at 10:29 PM, Joel Tremblet <[email protected] >> wrote: > >> >> Can I integrated this serial connection into my daemon >> > > You want to make a custom service: > > from twisted.application.service import Service > from twisted.internet import reactor > > class CommandService(Service): > def startService(self): > reactor.listenTCP(8001, tcpfactory) > SerialPort(USBClient(tcpfactory), COM_PORT, reactor, > baudrate=BAUD_RATE) > > and now you can add an instance of this service to the Application in your > .tac file, e.g.: > > CommandService().setServiceParent(application) > _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
