Skip to content

Instantly share code, notes, and snippets.

View agarman's full-sized avatar

Andrew Garman agarman

View GitHub Profile
@agarman
agarman / pexpect.py
Created February 17, 2017 03:39 — forked from blink1073/pexpect.py
Simple cross platform version of pexpect
'''Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.