Capturing Extension output (newbie)
Moshe Zadka
moshez at math.huji.ac.il
Thu Jun 8 03:28:24 EDT 2000
On Wed, 7 Jun 2000, Jeff wrote:
> Hi, I am trying to use python to extend some C functions someone wrote long
> ago. In all the examples I have seen on the web and in tutorials, none of
> them use anything like "printf" !! How can I get python to capture stuff
> that the C function sends to STDOUT???
Dup file descriptor 1 into the writing end of a pipe, and read from the
reading end.
Read documentation about:
os.pipe
os.dup2
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list
mailing list