Pyexpect is in another class of software. It is a Python testing utility that provides expressive assertions for unit testing.
On the other hand, the Unix expect program, and its Python equivalent pexpect, are used for automating interactive applications.