[Twisted-Python] How to run Twisted as a service in Windows?

Thomas Jacob jacob at internet24.de
Fri Aug 11 09:40:33 MDT 2006


For instance, instead of the following in your .tac-File

class FingerProtocol(protocol.Protocol):
    pass
class FingerFactory(protocol.ServerFactory):
    protocol = FingerProtocol

internet.TCPServer(1079, FingerFactory())



use this in the "initialize your services here"-Section


class FingerProtocol(protocol.Protocol):
    pass
class FingerFactory(protocol.ServerFactory):
    protocol = FingerProtocol
reactor.listenTCP(1079, FingerFactory())


see
http://twistedmatrix.com/projects/core/documentation/howto/tutorial/intro.html

On Fri, 2006-08-11 at 11:13 -0400, Mona Yazbeck wrote:
> Me again...
> 
> I read the code but I just don't know what to write in SvcDoRun where it is 
> written "initialize your services here"... the service need to be started 
> with this line: "twistd.py --python otherfile.py", can I write that directly 
> somewhere in there? How?
> 
> Many thanks

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20060811/b990195c/attachment.sig>


More information about the Twisted-Python mailing list