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 waits until the child exits. This is a blocking call. This will
  not read any data from the child, so this will block forever if the
  child has unread output and has terminated. In other words, the child
  may have printed output then called exit(), but, the child is
  technically still alive until its output is read by the parent.
  
  This method is non-blocking if :meth:`wait` has already been called
  previously or :meth:`isalive` method returns False.  It simply returns
  the previously determined exit status.
docstr_tok: ["This","waits","until","the","child","exits",".","This","is","a","blocking","call",".","This","will","not","read","any","data","from","the","child",",","so","this","will","block","forever","if","the","child","has","unread","output","and","has","terminated",".","In","other","words",",","the","child","may","have","printed","output","then","called","exit","(",")",",","but",",","the","child","is","technically","still","alive","until","its","output","is","read","by","the","parent",".","This","method","is","non-blocking","if",":","meth",":","`","wait","`","has","already","been","called","previously","or",":","meth",":","`","isalive","`","method","returns","False",".","It","simply","returns","the","previously","determined","exit","status","."]
code: def wait(self):
      """This waits until the child exits. This is a blocking call. This will
      not read any data from the child, so this will block forever if the
      child has unread output and has terminated. In other words, the child
      may have printed output then called exit(), but, the child is
      technically still alive until its output is read by the parent.
  
      This method is non-blocking if :meth:`wait` has already been called
      previously or :meth:`isalive` method returns False.  It simply returns
      the previously determined exit status.
      """
  
      ptyproc = self.ptyproc
      with _wrap_ptyprocess_err():
          # exception may occur if "Is some other process attempting
          # "job control with our child pid?"
          exitstatus = ptyproc.wait()
      self.status = ptyproc.status
      self.exitstatus = ptyproc.exitstatus
      self.signalstatus = ptyproc.signalstatus
      self.terminated = True
  
      return exitstatus
  
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 23 for calling the spawn obj's underlying member method code with example usage: obj.wait() and returns: exitstatus