<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Bino,</div><div><br></div><div><div>On Jan 9, 2012, at 12:39 AM, bino oetomo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">How to migrate that script to twistd, something like :<br></span></span></blockquote><div><br></div><div>First of all, it's probably not appropriate to launch a WX GUI with twistd. &nbsp;It's possible, but you don't get a lot of benefit. &nbsp;If you are running in a GUI environment, your users likely have different expectations of logging, daemonization, etc, than they would with a background daemon.</div><div><br></div><div>Second, your script below looks mostly sensible; I assume that "MyRPC" is a version of MyXMLRPCApp that isn't a wx.App. I'm assuming that you want to run this as a .tac file, (i.e. with "twistd -y"). &nbsp;If that's the case, then you're on the right track.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">------------------<br>#Create Application<br>application = service.Application("MultiService Example")<br>#Create xmlrpc site<br>myrpc = MyRPC()<br>site = server.Site(myrpc)<br>myrpcservice = internet.TCPServer(50008, site, interface='localhost')<br>#Creating Multi Service<br>multiService = service.MultiService()<br>#Add our Services to multiservice<br>myrpcservice.setServiceParent(multiService)<br>#Set created application to be serviceparent of multiservice<br>multiService.setServiceParent(application)<br>------------------<br></span></span></blockquote></div><br></body></html>