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