class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
code: def __init__(self, pid, fd):
      _make_eof_intr()  # Ensure _EOF and _INTR are calculated
      self.pid = pid
      self.fd = fd
      readf = io.open(fd, "rb", buffering=0)
      writef = io.open(fd, "wb", buffering=0, closefd=False)
      self.fileobj = io.BufferedRWPair(readf, writef)
  
      self.terminated = False
      self.closed = False
      self.exitstatus = None
      self.signalstatus = None
      # status returned by os.waitpid
      self.status = None
      self.flag_eof = False
      # Used by close() to give kernel time to update process status.
      # Time in seconds.
      self.delayafterclose = 0.1
      # Used by terminate() to give kernel time to update process status.
      # Time in seconds.
      self.delayafterterminate = 0.1
  
imports: import codecs
  import errno
  import fcntl
  import io
  import os
  import pty
  import resource
  import signal
  import struct
  import sys
  import termios
  import time
  from pty import STDIN_FILENO, CHILD
  from .util import which, PtyProcessError
label_desc: Use image node_id 1 to create a new PtyProcess object from inherited base classes: object with example: obj = PtyProcess(pid, fd)