[IPython-dev] ipython -twisted
Ville M. Vainio
Fri May 30 00:42:12 CDT 2008
On Fri, May 30, 2008 at 8:30 AM, Glenn H Tarbox, PhD <firstname.lastname@example.org> wrote:
>> BTW, I was wondering - does twisted even need an ipython shell thread?
>> E.g. qt4 event loop uses PyOS_InputHook, so if twisted is doing the
>> same thing the reactor should just run in background when ipython is
>> doing raw_input.
> An extension to this question would be: Why cant the reactor handle all
> IO, passing stdin and stdout to the appropriate reader / writer all in
> one thread. This may be due to blocking calls which are hard to avoid
> but I don't know the design well enough...
It would require making pyreadline and readline twisted-aware, which
is not easy (apparently). Since at least PyQt4 installs
PyOS_InputHook, the Qt4 reactor should work without a separate shell
thread without any additional coding.
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-dev