class_docstr: This class represents a process running in a pseudoterminal.
  
  The main constructor is the :meth:`spawn` classmethod.
docstr: This makes sure that no system resources are left open. Python only
  garbage collects Python objects. OS file descriptors are not Python
  objects, so they must be handled explicitly. If the child file
  descriptor was opened outside of this class (passed to the constructor)
  then this does not close it. 
docstr_tok: ["This","makes","sure","that","no","system","resources","are","left","open",".","Python","only","garbage","collects","Python","objects",".","OS","file","descriptors","are","not","Python","objects",",","so","they","must","be","handled","explicitly",".","If","the","child","file","descriptor","was","opened","outside","of","this","class","(","passed","to","the","constructor",")","then","this","does","not","close","it","."]
code: def __del__(self):
      """This makes sure that no system resources are left open. Python only
      garbage collects Python objects. OS file descriptors are not Python
      objects, so they must be handled explicitly. If the child file
      descriptor was opened outside of this class (passed to the constructor)
      then this does not close it."""
  
      if not self.closed:
          # It is possible for __del__ methods to execute during the
          # teardown of the Python VM itself. Thus self.close() may
          # trigger an exception because os.close may be None.
          try:
              self.close()
          # which exception, shouldn't we catch explicitly .. ?
          except:
              pass
  
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 6 for calling the PtyProcess obj's underlying member method code with example usage: obj.__del__() without return types