openpty() -> (master_fd, slave_fd) Open a pty master/slave pair, using os.openpty() if possible.
pty/openpty
openpty