[Twisted-Python] untwisting twistd
Mikhail
termim at gmail.com
Wed Jul 1 22:08:21 MDT 2009
IMHO there is a misunderstanding here. The point, at least from my POV is
to have the same functionality provided by twistd but with a different
interface. Right now twistd is a starter script that is used like:
twistd -noy -l my.log my_app.tac
As far as I can understand the OP is missing (me as well) the possibility
to have the same functionality with:
python my_app.py -noy -l my.log
or
my_app -noy -l my.log
without writing any kind of wrapping shell/python scripts.
In other words, if we consider example from the book:
file reverse_app.py:
from twisted.application import service
import reverse
application = service.Application("Reverser")
reverserService = reverse.ReverserService(()
reverserServise.setServiceParent(application)
and:
twistd -y reverse_app.py
I'd like to be able to have:
file reverse_app2.py:
from twisted.application import service
import reverse
application = service.Application("Reverser")
reverserService = reverse.ReverserService(()
reverserServise.setServiceParent(application)
if __name__ == '__main__':
from twisted.SOMETHING import run
run(...)
Regards,
Mikhail
More information about the Twisted-Python
mailing list