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.4.tar.gz
(17.9 kB
view details)
File details
Details for the file ptyprocess-0.4.tar.gz
.
File metadata
- Download URL: ptyprocess-0.4.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddba719428afc4dd4f5eb37307ae753c81f89ea63f18e7d35bbb494a88fd49dc |
|
MD5 | d29b8bfd7d2df4d9e4a0f87aafe59018 |
|
BLAKE2b-256 | 4e29c4eaccbb1e5d7c4c76f21358db006cd2333bd94eb6ddb93a06810f593b8d |