Run a subprocess in a pseudo terminal
Project description
Launch a subprocess in a pseudo terminal (pty), and interact with both the process and its pty.
Sometimes, piping stdin and stdout is not enough. There might be a password prompt that doesn’t read from stdin, output that changes when it’s going to a pipe rather than a terminal, or curses-style interfaces that rely on a terminal. If you need to automate these things, running the process in a pseudo terminal (pty) is the answer.
Interface:
p = PtyProcessUnicode.spawn(['python']) p.read(20) p.write('6+6\n') p.read(20)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptyprocess-0.5.tar.gz
(14.9 kB
view details)
File details
Details for the file ptyprocess-0.5.tar.gz
.
File metadata
- Download URL: ptyprocess-0.5.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb78fb2197b49ca1b7b2f37b047bc89c0da7a90f90bd5bc17c3ce388bb6ef59 |
|
MD5 | 0d1ecfba622cb4e35ee157c38de18eae |
|
BLAKE2b-256 | 214e590ee28cfe596e190cf5409ea0c29cb00dd61b22568571960bddeb8bac9c |