Pexpect is a Python Expect-like module. It spawns child applications, controls them, and responds to expected patterns in their output. It can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to automate setup scripts for duplicating software package installations on different servers. It can be used for automated software testing. It should work on any platform that supports the standard Python pty module. Its interface was designed to be easy-to-use, so performing simple tasks is easy. It includes an ANSI/VT100 terminal screen scraping module.
|Tags||Software Development Libraries Python Modules Testing Installation/Setup Shells Software Distribution Utilities|
Release Notes: Some big patches were added, which reintroduce the expect_exact() method. Apparently, a lot of people are using this method. It speeds up pattern matching if you don't need regexes. A lot of the examples were cleaned up. The hive.py script is almost useful enough to be its own project.
Release Notes: This release adds a new run() function which wraps the spawn() class and can handle most of the tasks for which spawn() was used (it's like a super os.system() function), a new pxssh class which specializes spawn to handle SSH connections, buffering, and improved speed.
Release Notes: A run() function was added, which can be used with result = pexpect.run(command) instead of child = pexpect.spawn(command). The ability to operate on open file descriptors was added, making it possible to control streams such as those from serial port devices.
Release Notes: This project was previously named Pypect.