expect module and/or functionality? Or SSH wrapper module?

Cameron Laird claird at starbase.neosoft.com
Tue Jul 9 14:29:34 EDT 2002


In article <m3vg7ox240.fsf at nefud.org>, cqx  <cqx at cube2.nefud.org> wrote:
>
>Is there a more up-to-date expect-like module than
>the ExpectPy-1.9b1 package available on SourceForge?
>
>I'm actually more interested in a pure python expect module if
>possible.  I mostly need it as an interface to 'ssh'.
			.
			.
			.
This is a poorly-documented topic.

You need this as an interface to ssh.  That's good to know.
Are you certain you must use passwords or passphrases in your
application?  Can you not rely entirely on stored keys?  If
you can, your requirement for Expect-like capabilities goes
away.

If not, no, you can't Expect with pure Python; there's no
practical way to get the pseudoterminal munging right without
calls into the C run-time library that Python itself can't
access.

I'm working on techniques to use standard distribution instal-
lations of (Tcl-based) Expect and (pure) Python to achieve
general results.  The idea is that many hosts--essentially
all Linuxes, for example--are already equipped with these
executables, so all you'd need to install are your pure-Python
scripts.  I don't have these ready yet, though.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list