[Twisted-Python] Manhole and StandardIO

Jean-Paul Calderone exarkun at divmod.com
Tue Jan 13 09:03:15 EST 2009


On Tue, 13 Jan 2009 10:08:06 +0100, Zoran Bosnjak <zoran.bosnjak at sloveniacontrol.si> wrote:
>> 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 suggestion. It works well.
>
>But the screen is cleared before prompt is displayed. Can I prevent this?

This is one of the unresolved problems mentioned in <http://twistedmatrix.com/trac/ticket/2991>.  The comment I left on that ticket regarding this was:

    Clearing the screen is a side-effect of resetting the terminal.
    Resetting the terminal is a shortcut for figuring out what the
    current terminate state is (for example, the position of the cursor,
    the current character attributes, etc). All of those things could
    be dealt with separately to avoid also clearing the screen.

So this can be fixed, it's just a matter of programming. :)

Jean-Paul




More information about the Twisted-Python mailing list