[Twisted-Python] twistd --uid and --logfile

2010-08-17 Thread Zoran Bosnjak
I am running twisted application from /etc/init/myapp.conf by exec statement like this: exec /usr/bin/twistd --uid= --gid= --logfile=/var/log/dir/file The problem is when log file is first created under /var/log/dir (dir is owned by user id), the owner of the file is 'root', not requested user. As

[Twisted-Python] global exception handler

2010-08-12 Thread Zoran Bosnjak
Hello all, is there a possibility to have a global (application wide) exception handler in twisted application? I would like to stop application in case of any unhandled error in deferred callbacks. If application is run from twistd ..., is it correct to stop application like this? def quit(failu

RE: [Twisted-Python] Manhole and StandardIO

2009-01-13 Thread Zoran Bosnjak
> StandardIO accepts an IProtocol provider as an argument. > Manhole does not implement IProtocol, it implements > ITerminalProtocol. So you cannot use these two classes > together like this. > > See twisted/conch/stdio.py for examples of how to use manhole > on stdio. Thanks for your sugge

[Twisted-Python] Manhole and StandardIO

2009-01-12 Thread Zoran Bosnjak
Hello all, I would like to have a simple console python interactive shell, powered by twisted. I am looking for something like this... --- from twisted.internet import reactor, stdio from twisted.conch.manhole import Manhole stdio.StandardIO(Manhole()) reactor.run() --- ... but it does not work.