> 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? Here is my script: --- import os, tty, sys, termios from twisted.internet import reactor, stdio from twisted.conch.insults.insults import ServerProtocol from twisted.conch.manhole import Manhole class ConsoleManhole(Manhole): def connectionLost(self, reason): reactor.stop() fd = sys.__stdin__.fileno() oldSettings = termios.tcgetattr(fd) tty.setraw(fd) try: p = ServerProtocol(ConsoleManhole) stdio.StandardIO(p) reactor.run() finally: termios.tcsetattr(fd, termios.TCSANOW, oldSettings) os.write(fd, "\r\x1bc\r") --- Zoran _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python