hackingKK wrote: > Hello all. > I have been using the twisted library for quite some time and I must say > it is the best library for xmlrpc. > I have a tcp server listening on a port and I use reactor.run() to start it. > Now I want to learn how to daemonise the entire code. […] > So I just want to know if I have to write a seperate file to run this as > a daemon? > As a side note, I used twistd -y rpc_main.py to see what happens.
Using twistd -y is a good way to daemonise your Twisted program, but the -y option takes a “TAC” file, not just any Python file. They are briefly described, including an example, here: <http://twistedmatrix.com/documents/current/core/howto/application.html#auto5> The really short version is rather than calling reactor methods like reactor.connectTCP directly, you create a bunch of service objects that will do those things when started, and attach those to an Application instance called “application”. That's a TAC file. -Andrew. _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
