class_docstr: This is the main class interface for Pexpect. Use this class to start
  and control child applications. 
class_docstr_tok: ["This","is","the","main","class","interface","for","Pexpect",".","Use","this","class","to","start","and","control","child","applications","."]
docstr: This returns a human-readable string that represents the state of
  the object. 
docstr_tok: ["This","returns","a","human-readable","string","that","represents","the","state","of","the","object","."]
code: def __str__(self):
      """This returns a human-readable string that represents the state of
      the object."""
  
      s = []
      s.append(repr(self))
      s.append("command: " + str(self.command))
      s.append("args: %r" % (self.args,))
      s.append(
          "buffer (last %s chars): %r"
          % (self.str_last_chars, self.buffer[-self.str_last_chars :])
      )
      s.append(
          "before (last %s chars): %r"
          % (
              self.str_last_chars,
              self.before[-self.str_last_chars :]
              if self.before
              else "",
          )
      )
      s.append("after: %r" % (self.after,))
      s.append("match: %r" % (self.match,))
      s.append("match_index: " + str(self.match_index))
      s.append("exitstatus: " + str(self.exitstatus))
      if hasattr(self, "ptyproc"):
          s.append("flag_eof: " + str(self.flag_eof))
      s.append("pid: " + str(self.pid))
      s.append("child_fd: " + str(self.child_fd))
      s.append("closed: " + str(self.closed))
      s.append("timeout: " + str(self.timeout))
      s.append("delimiter: " + str(self.delimiter))
      s.append("logfile: " + str(self.logfile))
      s.append("logfile_read: " + str(self.logfile_read))
      s.append("logfile_send: " + str(self.logfile_send))
      s.append("maxread: " + str(self.maxread))
      s.append("ignorecase: " + str(self.ignorecase))
      s.append("searchwindowsize: " + str(self.searchwindowsize))
      s.append("delaybeforesend: " + str(self.delaybeforesend))
      s.append("delayafterclose: " + str(self.delayafterclose))
      s.append("delayafterterminate: " + str(self.delayafterterminate))
      return "\n".join(s)
  
imports: import os
  import sys
  import time
  import pty
  import tty
  import errno
  import signal
  from contextlib import contextmanager
  import ptyprocess
  from ptyprocess.ptyprocess import use_native_pty_fork
  from .exceptions import ExceptionPexpect, EOF, TIMEOUT
  from .spawnbase import SpawnBase
  from .utils import which, split_command_line, select_ignore_interrupts, poll_ignore_interrupts
label_desc: Use image node_id 2 for calling the spawn obj's underlying member method code with example usage: obj.__str__() and returns: str