[Twisted-Python] Manhole and StandardIO
exarkun at divmod.com
Mon Jan 12 17:21:31 EST 2009
On Mon, 12 Jan 2009 23:09:40 +0100, Zoran Bosnjak <zoran.bosnjak at sloveniacontrol.si> wrote:
>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
>... but it does not work.
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.
More information about the Twisted-Python