I've been asked to make telnet, ssh, bash and rpcclient
(http://www.samba-tng.org), http requests and possibly
much more all look seamlessly like telnet.
That means splitting telnetlib.py's Telnet class down
into a base class. I need the write, read_until,
expect and friends, but did not want to do a total
rewrite / total pain-in-the-neck cut/paste job on
telnetlib.py just to fulfil the requirements.
I have noticed that someone wrote an scp class, already
before: it's available on parnassus. it wraps scp in
popen. with this TelnetBase class, doing the same
thing will be trivial _and_ you get the exact same look
and functionality as if it was a Telnet() instance.
well, it makes _me_ happy enough to submit this patch.
copyright is hereby assigned to Guido van Rossum.
authorship must remain as-is.
have fun,
luke
|