Hello,
twistd -r epoll -y ./nfddaemon.tac
The below is the .tac file:
from twisted.application import service,internet
from nfdmessenger import ServerContextFactory
from twisted.internet import ssl, reactor
def get_service():
serverContext = ServerContextFactory()
return reactor.listenSSL(2000, serverContext, serverContext)
application=service.Application('nfdm')
service=get_service()
service.setServiceParent(application)
Not sure what to do at this point. It runs and then dies, doing something wrong
in getService() dont know ehat the correct syntax is:
File "./nfddaemon.tac", line 12, in <module>
service.setServiceParent(application)
exceptions.AttributeError: 'Port' object has no attribute
'setServiceParent'
Thanks,
Garyc
--- On Mon, 3/15/10, Reza Lotun <[email protected]> wrote:
> From: Reza Lotun <[email protected]>
> Subject: Re: [Twisted-Python] Creating a daemon from my application
> To: "Twisted general discussion" <[email protected]>
> Date: Monday, March 15, 2010, 1:15 PM
> On Mon, Mar 15, 2010 at 6:03 PM, gary
> clark <[email protected]>
> wrote:
> > Yeh I have to install them and create a setup.py to
> find the path.
>
> You only need to set your PYTHONPATH environment variable.
>
> e.g.
>
> $ export PYTHONPATH=/path/to/dir/containing/code
>
> --
> Reza Lotun
> mobile: +44 (0)7521 310 763
> email: [email protected]
> work: [email protected]
> twitter: @rlotun
>
> _______________________________________________
> Twisted-Python mailing list
> [email protected]
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python