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

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Jun 25 04:13:50 CEST 2003


Norman Shelley <Norman.Shelley at motorola.com>:

> I want to be able to do an fprintf to stderr say like this example.
> But how does one define stderr?

  cdef extern from "stdio.h":
    ctypedef struct FILE
    int fprintf(FILE *, char *, ...)

That should be close enough, even if FILE isn't really
defined as a struct in stdio.h.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list