!!!SPAM9998: [Pyrex] Best/easiest way to access C's stderr?

Andreas Kostyrka andreas at mtg.co.at
Thu Jun 26 18:04:41 CEST 2003


On Wed, 2003-06-25 at 01:02, Norman Shelley wrote:
> What is the best/easiest way to access C's stderr in a *.pyx file?
> 
> I want to be able to do an fprintf to stderr say like this example.  But how
> does one define stderr?
> 
> cdef somefunction():
>     fprintf(stderr, "...")

import sys
sys.stderr.write(format % args)

Python files are mapped to stdio.h FILEs :)

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20030626/642615b7/attachment.bin


More information about the Pyrex mailing list