ID EN
OS

openpty

Python 3.11

Open a new pseudo-terminal pair. Return a pair of file descriptors (master, slave) for the pty and the tty, respectively. The new file descriptors are non-inheritable. For a (slightly) more portable approach, use the pty module.

Syntax

PYTHON
os.openpty()

See Also

non-inheritable pty Availability