ptyprocess
A library to run subprocesses in a pseudo terminal, version 0.7.0. It is actively maintained with a release cadence focused on improvements and CI updates.
Warnings
- gotcha Not all subprocesses behave the same in a pseudo terminal.
- deprecated Older methods of invoking processes may not fully utilize the pty.
Install
-
pip install ptyprocess
Imports
- PTYProcess
from ptyprocess import PTYProcess
Quickstart
import os from ptyprocess import PTYProcess proc = PTYProcess.spawn(['ls', '-l']) print(proc.read())