Cutting and Pasting in Windows IDLE

Terry Reedy tjreedy at udel.edu
Fri Aug 15 01:35:24 EDT 2008



Gabriel Genellina wrote:
> En Tue, 12 Aug 2008 13:04:05 -0300, Victor Subervi 
> <victorsubervi at gmail.com> escribi�:
> 
>> A couple of weeks ago I asked how to cut and paste multiple lines in the
>> Windows IDLE interface. I can only paste one line at a time! 
>> Frustrating.

You can paste a multi-line statement and it gets executed.
You can paste in more, and the first may be executed, but anything after 
  is ignored.

>> I want it to work like my Linux interpreter.

I presume you are talking about the Python interpreter in interactive 
mode, not IDLE on Linux.  The interactive interpreter in Windows also 
accepts multiple statements.

 > Why doesn´t it?

There may be some difference between how TK receives pasted text and how 
console windows do.  The problem seems to be that TK or IDLE does not 
recognize pasted \n as being the same as literally typed \n, as far as 
indicating 'execute this statement'.

 > Please help.

Open an edit window, paste there, and hit F5.  For multiple lines, this 
is better as you will be able to correct error and make changes.  To 
make this easy, put a temp.py file in your python director or a subdir 
thereof.  If you use it regularly, File/RecentFiles should show it near 
the top, making it easy to open.

> Instead of complaining here, report a bug at http://bugs.python.org/

http://bugs.python.org/issue3559

tjr




More information about the Python-list mailing list