MCPcopy Index your code
hub / github.com/RustPython/RustPython / openpty

Function openpty

Lib/pty.py:26–36  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

24CHILD = 0
25
26def openpty():
27 """openpty() -> (master_fd, slave_fd)
28 Open a pty master/slave pair, using os.openpty() if possible."""
29
30 try:
31 return os.openpty()
32 except (AttributeError, OSError):
33 pass
34 master_fd, slave_name = _open_terminal()
35 slave_fd = slave_open(slave_name)
36 return master_fd, slave_fd
37
38def master_open():
39 """master_open() -> (master_fd, slave_name)

Callers 1

forkFunction · 0.70

Calls 2

_open_terminalFunction · 0.85
slave_openFunction · 0.85

Tested by

no test coverage detected