class_docstr: This class allows to capture writes to sys.stdout|stderr "in-memory"
  and will raise errors on tries to read from sys.stdin. It only
  modifies sys.stdout|stderr|stdin attributes and does not
  touch underlying File Descriptors (use StdCaptureFD for that).
code: def __init__(
      self, out=True, err=True, in_=True, mixed=False, now=True
  ):
      self._oldout = sys.stdout
      self._olderr = sys.stderr
      self._oldin = sys.stdin
      if out and not hasattr(out, "file"):
          out = TextIO()
      self.out = out
      if err:
          if mixed:
              err = out
          elif not hasattr(err, "write"):
              err = TextIO()
      self.err = err
      self.in_ = in_
      if now:
          self.startall()
  
imports: import os
  import sys
  import py
  import tempfile
label_desc: Use image node_id 1 to create a new StdCapture object from inherited base classes: Capture with example: obj = StdCapture(out, err, in_, mixed, now)