prefer Python for new scripts?

Ezra Peisach epeisach at MIT.EDU
Fri Oct 30 18:54:32 EDT 2009

Greg Hudson wrote:
> I like Python.
> I may set up Buildbot at some point to replace the ad hoc nightly test
> framework Ken set up.  Time permitting, I may also work on Python
> support for system tests (similar to what we have in tcl--the ability to
> easily set up and tear down Kerberos environments to run test cases in).
> I don't think there's a Python equivalent of "expect", so in a few cases
> we might need to beef up programs to accept passwords from sources other
> than the controlling terminal, if we don't have support for that
> already.
I found pexpect  ( or )  - is a pure python version of expect 
interface... According to the FAQ:

      Q: Isn't there already a Python Expect?

A: Yes, there are several of them. They usually require you to compile 
C. I wanted something that was pure Python and preferably a single 
module that was simple to install. I also wanted something that was easy 
to use. This pure Python expect only recently became possible with the 
introduction of the pty module in the standard Python library. 
Previously C extensions were required.

So - we could distribute Pexpect...  (like krb5 use to distribute 

The pty module appears to exist as far back as python 2.3.3.. Although I 
cannot say how buggy the older implementations are.... Pexpect is 
written and tested w/ Python 2.5.

Licensing of pexpect looks ok... (but someone else should check)...


More information about the krbdev mailing list