E
Elad
Hello All,
I am trying to capture some printf's from a C function called by
python.
<Working under winxp>
I have tried to following:
STDOUT = 1 # stdout fd
(re, we) = os.pipe() # Create re / write handlers
dup2(we, STDOUT) # override system's stdout, should dup first and
restore later..
call_my_hello_world() # if stdout is not overriden will print hello
world on console screen
x = os.read(re, 11)
sadly, x = '' after the code is executed.
help ?
Thanks,
Elad.
I am trying to capture some printf's from a C function called by
python.
<Working under winxp>
I have tried to following:
STDOUT = 1 # stdout fd
(re, we) = os.pipe() # Create re / write handlers
dup2(we, STDOUT) # override system's stdout, should dup first and
restore later..
call_my_hello_world() # if stdout is not overriden will print hello
world on console screen
x = os.read(re, 11)
sadly, x = '' after the code is executed.
help ?
Thanks,
Elad.