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.3.1.tar.gz
(11.6 kB
view details)
File details
Details for the file ptyprocess-0.3.1.tar.gz.
File metadata
- Download URL: ptyprocess-0.3.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2071d6305c03a0337224786ce8c95d37223b3d8b34529efe3b314c517035daa
|
|
| MD5 |
cf47dd902d2f7820b91050e1e61c3631
|
|
| BLAKE2b-256 |
7d01184f96c5d164da335ef60af8e685eb23612d02d212a9468fac6bfd3878d6
|