Roger Serwy added the comment:

The core problem is that IDLE only executes the shell buffer when the 
<<newline-and-indent>> virtual event gets sent by physically pressing the Enter 
key. Pasting the clipboard contents with \n will not trigger the enter_callback 
function in Lib/idlelib/PyShell.py.

The MultiLineRun.py extension as part of IdleX intercepts the pasted text and 
splits the buffer on '\n' and then runs each line.

Mark, what you are suggesting is adding something like a "Paste and Execute" 
option for the shell and its right-click menu which mimics the %paste magic 
from IPython. That's doable.

----------
nosy: +roger.serwy
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3559>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to