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

    try:
        return os.openpty()
    except (AttributeError, OSError):
        pass
    master_fd, slave_name = _open_terminal()
    slave_fd = slave_open(slave_name)
    return master_fd, slave_fd
def openpty ( ) : try : return os . openpty ( ) except ( AttributeError , OSError ) : pass master_fd , slave_name = _open_terminal ( ) slave_fd = slave_open ( slave_name ) return master_fd , slave_fd