[Python-bugs-list] [ python-Bugs-545425 ] No output from extension modules

noreply@sourceforge.net noreply@sourceforge.net
Wed, 17 Apr 2002 22:49:11 -0700


Bugs item #545425, was opened at 2002-04-18 01:47
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=545425&group_id=5470

Category: IDLE
Group: Python 2.2
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Peter Bienstman (pbienst)
Assigned to: Nobody/Anonymous (nobody)
Summary: No output from extension modules

Initial Comment:
When running a python script calling a C extension 
module under IDLE, any output the C code generates to 
stdout is not displayed in the interactive window, at 
least not on Windows.

Running the same code from the command line works 
fine.

This happens even with the simplest 'Hello world' 
module.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-18 07:49

Message:
Logged In: YES 
user_id=21627

That is not a bug: Python does not replace the C library;
printf does whatever the C library thinks it should do.

If you want to write to sys.stdout, use PySys_WriteStdout.

To see your printf output on Windows in IDLE, try starting
IDLE from a console window (whether this helps or not
depends on the Windows version).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=545425&group_id=5470