Terry J. Reedy added the comment:
In my example the screen before the output had
>>> go()
>>> a =
12,|
where '|' is the blinking input cursor. The '\n' terminated print output is
inserted *after* '>>> ' but before the imcomplete statement. When the
statement I want it *before* the prompt, with '\n' appended if necessary. In
the minimized example, the result would be
>>> from threading import Timer
>>> Timer(0.1, lambda: print('hello'), ()).start()
'hello'
>>>
If delayed output 'junk' does not end with '\n', we can get
>>> junkg=4 # 'g' started where the 'j' ends up.
>>> g
4
This is buggy as a history listing.
IDLE's current behavior, which keeps user input and program output better
separated, is much better than interactive Python in the console Steven used,
where the output is placed at the end of the incomplete statement, which is a
nuisance.
The first step is to find where text from the user program is inserted into the
Shell text box. Then, how is the insertion point moved back -- but just not
quite far enough. The solution might then be obvious.
A 'deeper' idea that would solve this (and other issues) is a separate Shell
input box (without '>>> ') under the Shell history box. But that is a separate
discussion.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31331>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com