[PEAK] Re-asking: Mixing peak app and twisted app
davidh at ilm.com
Thu Dec 15 14:36:44 EST 2005
I'm very new to peak, and I know this question has been asked before,
but I don't fully understand the answers...probably because I'm also
relatively new to twisted.
What I want to do is actually really simple: I just want to run a
twisted daemon, but I want it to be a peak app as well so it can load
ini files etc.
My twisted code, which runs like a charm is, essentially:
from twisted.application import service, internet
from twisted.web import xmlrpc, server
application = service.Application("daemon")
daemon = DaemonClass()
serverFactory = server.Site(daemon)
server = internet.TCPServer(8800, serverFactory)
So now I want to mix this with peak...but I'm not sure how to set up and
run a peak app and launch the daemon. What do I make the daemon a
sub-class of in peak? How does the application launch? Right now I've
been launching via twistd...but I don't suspect I can continue doing that.
More information about the PEAK