On this page
pty.spawn
Prev: pty.openpty | Up: pty
Rel: pty.fork, pty.openpty
Ref: docs.python.org — pty.spawn
Tags: #public #python3 #stdlib #pty
Import
import pty
from pty import spawn
Signature & Overview
pty.spawn(argv, master_read=<function _read at 0x10a876560>, stdin_read=<function _read at 0x10a876560>)
Create a spawned process.
Usage
import pty
# Unix-only: runs a command inside a PTY bridged to the current terminal
assert callable(pty.spawn)
Gotchas
- Interactive terminal bridge: For automated expect-style testing, consider
pexpect.
REPL Inspect
from pty import spawn
help(spawn)
Linked from
Related notes
- tuts/python3/stdlib_module/pty/fork Linked here; links to this page; shared tags: #pty, #stdlib
- tuts/python3/stdlib_module/pty/openpty Linked here; links to this page; shared tags: #pty, #stdlib
- tuts/python3/stdlib_module/pty Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib