module io.stdhelper
¶
Functions¶
function |
truncated documentation |
---|---|
Catch standard output and error for function function_to_call. If lang is ‘py’, calls |
|
Capture the standard output and error for function function_to_call, it wraps C code which catches information … |
|
Capture the standard output and error for function function_to_call with function redirect_stdout … |
Documentation¶
Python wrapper around C functions.
-
cpyquickhelper.io.stdhelper.
capture_output
(function_to_call, lang='py')¶ Catch standard output and error for function function_to_call. If lang is ‘py’, calls
capture_output_py
orcapture_output_c()
if lang is ‘c’.- Parameters
function_to_call – function to call
- Returns
output, error
-
cpyquickhelper.io.stdhelper.
capture_output_c
(function_to_call) → Tuple¶ Capture the standard output and error for function function_to_call, it wraps C code which catches information from the command line.
- Parameters
function_to_call – function to call
- Returns
output, error
This function must not be called in parallel with another call of the same function.
Warning
error is always empty. Both streams are merged.
-
cpyquickhelper.io.stdhelper.
capture_output_py
(function_to_call) → Tuple[str, str]¶ Capture the standard output and error for function function_to_call with function redirect_stdout and function redirect_stderr.
- Parameters
function_to_call – function to call
- Returns
output, error
This function must not be called in parallel with another call of the same function.
Warning
error is always empty. Both streams are merged.