[Python-bugs-list] [ python-Bugs-573174 ] OSX IDE behaviour (output to console)

noreply@sourceforge.net noreply@sourceforge.net
Wed, 10 Jul 2002 13:26:09 -0700


Bugs item #573174, was opened at 2002-06-24 17:40
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=573174&group_id=5470

Category: IDLE
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Carl Hagelberg (chagel)
>Assigned to: Just van Rossum (jvr)
Summary: OSX IDE behaviour (output to console)

Initial Comment:

On woensdag, juni 5, 2002, at 05:15 , Carl Hagelberg wrote:

> Hi Jack,
>
> There's a difference between the result of the following 
> example when using
> the interactive window and a 'program window' using
the "Run 
> all" button
> (OSX):
>
> a, b = 0, 1
> while b < 1000:
>     print b,
>     a, b = b, a+b
>
>
> With out the "," after 'print b' they both work the
same. With 
> the comma
> only the interactive window works. Is there a syntax
issue in 
> the program
> window?

Carl,
this is a "known issue", but unfortunately one that is
difficult 
to fix. The IDE flushes output to the console window on 
end-of-line only. It has no knowledge of the print
statement, it 
just sees a stream of characters, and it can flush
either (a) at 
ever character or (b) at every end-of-line. The first
would make 
it horrendously inefficient, so it does the latter. Put
one 
"print" without the comma at the end and everything
will be 
printed.

But: this bug should be noted in the sourceforge bug
list. Could 
you please add it (category Macintosh, assign it to me
or Just 
(jvr))?
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your
revolution -- 
Emma Goldman -



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

>Comment By: Jack Jansen (jackjansen)
Date: 2002-07-10 22:26

Message:
Logged In: YES 
user_id=45365

Just,
I'm assigning this to you (should have done so weeks ago:-).
It might be worthwhile to check out whether Idle has a workaround for this. Maybe something like doing a sys.stdout.flush() at a strategic point in the event loop is a solution (if it isn't too expensive), and otherwise at least such a flush when IDE goes idle (no pun intended).

And if it's too difficult just mark it "won't fix":-)

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

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