printf "fails" in extension

Robert Ferrell ferrell at diablotech.com
Fri Oct 17 15:58:42 EDT 2003


I'm trying to "extend" Python by writing a bit of C code.  I followed
the example in the Python documentation, and almost everything works
fine.  I can build a DLL, fire up an interactive Python session and
import my new module. Methods work almost as expected.

The only problem I'm having is that I can't print to the screen from
the C code.  Printing to a file works fine, but neither printf nor
fprintf(stdout,...) puts anything onto the screen.

I'm working in Windows2K, using Python2.3.  Is there some trick to get
this to work?  I'm wondering if this is a compiler issue (I'm building
the DLL using an Absoft compiler).  I googled around looking for
relevant information, but I didn't find any.  Perhaps I didn't have
the right key words?

Any ideas,
thanks,
-robert




More information about the Python-list mailing list