New submission from Terry J. Reedy <tjre...@udel.edu>:
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. ---------- messages: 331668 nosy: cheryl.sabella, rhettinger, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: unrequested pasting into Shell after restart type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35467> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com