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.

Author terry.reedy
Recipients cheryl.sabella, rhettinger, taleinat, terry.reedy
Date 2018-12-12.02:32:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za>
In-reply-to
Content
IDLE very occasionally (frequency much less than .01), and AFAIK hapzardly, pastes previous shell output after I enter something at the prompt after a restart.  Not fatal but definitly annoying.  When it happened today, I decided to open this issue to start accumulating information that might point at where to start.

tem3.py:  (content likely not relevant)

import inspect
class A:
    pass
print(inspect.getsource(A))
print(__name__)

Shell copy:
"""
...
OSError: could not find class definition
>>> 
======================== RESTART: F:\Python\a\tem3.py ========================
class A:
    pass

__main__
>>> 1/0======================== RESTART: F:\Python\a\tem3.py ========================
class A:
    pass
SyntaxError: invalid syntax
>>> 1/0
Traceback (most recent call last):
...
"""

The paste, after '1/0', is the restart line and the first two lines of output (but not the last two).  It mixes text from IDLE and from the program, so it is not an echo from the run process).  It is colored as if typed in: 'class' and 'pass' are keyword colored, the  I believe I hit ENTER  and got the paste instead of the exception.  I hit Entere after the paste to get the SyntaxError and a clean prompt.  Then I reentered 1/0.

I did more or less the same thing about 5 times without a repeat of the problem.

Possible factors:
exception before restart (probably not relevant).
restart, prompt, and entry (I believe these are essential elements).
running a file (I seldom restart other wise).
hitting return

Included Content:
restart line (I am pretty sure pasted text does not always include this).
output from before the restart (ever?).
output from after the restart (if always, must have run a file).
---

Raymond, I believe you have seen this on Mac.  Tal or Sheryl, how about linux?  Anyone, more details on other examples are needed to know what is constant and what is incidental.
History
Date User Action Args
2018-12-12 02:32:04terry.reedysetrecipients: + terry.reedy, rhettinger, taleinat, cheryl.sabella
2018-12-12 02:32:04terry.reedysetmessageid: <1544581924.2.0.788709270274.issue35467@psf.upfronthosting.co.za>
2018-12-12 02:32:03terry.reedylinkissue35467 messages
2018-12-12 02:32:00terry.reedycreate