parameters: ()
return_statement: return master_fd, slave_fd
docstring: openpty() -> (master_fd, slave_fd)
      Open a pty master/slave pair, using os.openpty() if possible.
docstring_summary: openpty() -> (master_fd, slave_fd)
      Open a pty master/slave pair, using os.openpty() if possible.
docstring_tokens: openpty () - > ( master_fd slave_fd ) Open a pty master / slave pair using os . openpty () if possible .
function: 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
function_tokens: 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