parameters: (self)
docstring: redirects stdout/stderr to devnull if necessary
docstring_summary: redirects stdout/stderr to devnull if necessary
docstring_tokens: redirects stdout / stderr to devnull if necessary
function: def init_blackhole(self):
          """redirects stdout/stderr to devnull if necessary"""
          if self.no_stdout or self.no_stderr:
              blackhole = open(os.devnull, 'w')
              if self.no_stdout:
                  sys.stdout = sys.__stdout__ = blackhole
              if self.no_stderr:
                  sys.stderr = sys.__stderr__ = blackhole
function_tokens: def init_blackhole ( self ) : if self . no_stdout or self . no_stderr : blackhole = open ( os . devnull , 'w' ) if self . no_stdout : sys . stdout = sys . __stdout__ = blackhole if self . no_stderr : sys . stderr = sys . __stderr__ = blackhole