original_docstring: Decorator to capture of C-emitted output to stderr.
docstring: Decorator to capture of C-emitted output to stderr.
docstring_tokens: Decorator to capture of C - emitted output to stderr .
code: def organs(func):
      """Decorator to capture of C-emitted output to stderr."""
  
      @functools.wraps(func)
      def wrapper(*args, **kwargs):
          if args:
              logger.debug("args: {!r}".format(args))
          if kwargs:
              logger.debug("kwargs: {!r}".format(kwargs))
          _err = StringIO()
          with pipes(stdout=None, stderr=_err):
              try:
                  ret = func(*args, **kwargs)
              except _WgribError as e:
                  import time
                  time.sleep(0.2)  # Wurlitzer.flush_interval
                  raise WgribError(_err.getvalue()) from e
          err = _err.getvalue()
          if err:
              warnings.warn("\n" + err, stacklevel=2)
          # FIXME: testing overhead
          # ret = func(*args, **kwargs)
          # if ret is None:
          # Fatal error, by convention
          #     raise WgribError('Some error')
          return ret
  
      return wrapper
code_tokens: def organs ( func ) : @ functools . wraps ( func ) def wrapper ( * args , ** kwargs ) : if args : logger . debug ( "args: {!r}" . format ( args ) ) if kwargs : logger . debug ( "kwargs: {!r}" . format ( kwargs ) ) _err = StringIO ( ) with pipes ( stdout = None , stderr = _err ) : try : ret = func ( * args , ** kwargs ) except _WgribError as e : import time time . sleep ( 0.2 ) raise WgribError ( _err . getvalue ( ) ) from e err = _err . getvalue ( ) if err : warnings . warn ( "\n" + err , stacklevel = 2 ) return ret return wrapper
short_docstring: Decorator to capture of C-emitted output to stderr.
short_docstring_tokens: Decorator to capture of C - emitted output to stderr .
comment: """Decorator to capture of C-emitted output to stderr."""$SEP$# Wurlitzer.flush_interval$SEP$# FIXME: testing overhead$SEP$# ret = func(*args, **kwargs)$SEP$# if ret is None:$SEP$# Fatal error, by convention$SEP$#     raise WgribError('Some error')