By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,996 Members | 1,498 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,996 IT Pros & Developers. It's quick & easy.

Starting twisted service manually

P: n/a
qvx
I want to start twisted app from another GUI application and not via
twistd.
It works fine when started via twistd (1 & 2) but not when I try to
start it
manually (1 & 3) - nothing is listening to 8080 port.
# (1) common part
from nevow import rend, appserver
from twisted.application import service, internet
from twisted.internet import reactor

class Index(rend.Page):
...
# (2) part used when running via twistd
application = service.Application("my-app")
internet.TCPServer(8080,
appserver.NevowSite(Index(r'D:\www'))).setServiceP arent(application)
# (3) attempt to start the same thing but inside a larger (wxPython)
app
def run_in_thread():
def runner():
application = service.Application("my-app")
internet.TCPServer(8080,
appserver.NevowSite(Index(r'D:\www'))).setServiceP arent(application)
reactor.run(0)
thread.start_new_thread(runner, ())
I feel lost in twisted documentation and HOWTOs.

Please help!

Qvx

Sep 1 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.