On Wed, 4 Oct 2006 11:19:35 +0100, Matthew Warren <[EMAIL PROTECTED]> wrote: > >Hi, > >I use telnetlib in an app I am writing, and would like to add >functionality to it to support interactive terminal sessions , IE: be >able to 'vi' a file. > >Currently it seems telnetlib isnt quite sophisticated enoguh to support >such a thing. > >The trouble is, I havent got a clue where to start and would appreciate >a couple of pointers to get me going... >
I'd suggest taking a look at Twisted, which contains a more complete telnet implementation (not as important for being able to launch vi), an ssh implementation (which you might want to use instead of telnet), a VT102 implementation (which is actually what will help you run programs that want to fiddle around with the cursor in fancy ways), as well as a fair amount of work towards a simple terminal emulator (to help you keep track of what vi has done to your virtual terminal). API docs for insults: http://twistedmatrix.com/documents/current/api/twisted.conch.insults.html And for the telnet implementation: http://twistedmatrix.com/documents/current/api/twisted.conch.telnet.html Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list