pytty
Pytty is a Python library designed to provide a convenient interface to pseudo-terminals (PTYs) and terminal emulation. It abstracts the underlying OS PTY APIs to let Python programs spawn subprocesses with an attached controlling terminal, manage window sizes, and handle bidirectional I/O.
Key features include creation of PTY pairs (master and slave), spawning subprocesses with the slave end as
Pytty is built to be lightweight and minimally invasive. It typically uses the standard library facilities
Usage generally involves creating a PTY pair, launching a subprocess with the slave end as its standard
Applications for pytty include interactive shells, automation and testing of command-line programs, terminal multiplexing, and remote-terminal