From: lkcl on
On Mar 11, 2:16 am, alex23 <wuwe...(a)> wrote:
> Victor Subervi <victorsube...(a)> wrote:
> > > There's a program (vpopmail) that has commands which, when called, request
> > > input ("email address", "password", etc.) from the command line. I would
> > > like to build a TTW interface for my clients to use that interacts with
> > > these commands.
> The Pexpect[1] module is pretty much aimed at doing exactly this.
> 1:

i also made some patches to back in 2000, creating an and then using that in the code is still
in python's bug tracker, and no fucker has integrated it, despite it
still being valid, relevant and useful, in ten years since.

the code basically creates a base class from which the "old"
telnetlib derives, but it also provides an additional class
TelnetPopen which, as you might expect, can be used to run python
popen and then use _all_ of the functions in telnetlib which should
never have been hard-coded as specifically being associated with the
Telnet class (hence why i moved them to

it's therefore possible to use it to do ssh "as if" it was telnet
(remember to use the -t option to stop terminal translation, and
remember to use TelnetPopen because otherwise you have to patch ssh to
accept passwords on the command-line!)

in order to avoid clashes with, i often rename it to and i believe i've regularly published them in other
free software projects, so you should find it with a search for
"". if you can't specifically find the two modules, let
me know, and i'll make them available somewhere.