This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Mac IDE behaviour (output to console)
Type: Stage:
Components: macOS Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: jvr Nosy List: bob.ippolito, chagel, jackjansen, jvr
Priority: normal Keywords:

Created on 2002-06-24 15:40 by chagel, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (4)
msg11308 - (view) Author: Carl Hagelberg (chagel) Date: 2002-06-24 15:40
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 -

msg11309 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2002-07-10 20:26
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":-)
msg11310 - (view) Author: Just van Rossum (jvr) * (Python triager) Date: 2002-07-24 18:22
Logged In: YES 
user_id=92689

I just looked at Idle's OutputWindow.py, and that doesn't do any buffering 
at all. So I wonder whether we should do that, too. Or maybe autoflush if 
the buffer is longer than X bytes.
msg11311 - (view) Author: Bob Ippolito (bob.ippolito) * (Python committer) Date: 2006-07-15 17:10
Logged In: YES 
user_id=139309

IDE is deprecated in favor of IDLE.
History
Date User Action Args
2022-04-10 16:05:26adminsetgithub: 36791
2002-06-24 15:40:12chagelcreate