[New-bugs-announce] [issue1178] IDLE - add "paste code" functionality

Tal Einat report at bugs.python.org
Wed Sep 19 00:03:30 CEST 2007

New submission from Tal Einat:

Patch adding a 'Paste Code' item to the 'Edit' menu, as well as hotkeys.

Using 'Paste Code' instead of the normal paste will remove prompts ('>>>
' or '... ') from the code, and also remove empty lines if pasting to a
shell window.

This allows easily copy/pasting code between shell and editor windows,
as well as easily pasting code from other applications (e.g. a web
browser) into IDLE.

This patch uses IDLE's PyParse.py for parsing code, and Tk's clipboard
API for interaction with the clipboard (it changes the clipboard's
contents, generates a normal paste event, and changes the contents back).

Test only on WinXP SP2 so far, needs to be tested on other platforms,
especially the clipboard interaction.

components: IDLE
files: IDLE_paste_code.070918.patch
messages: 56017
nosy: taleinat
severity: minor
status: open
title: IDLE - add "paste code" functionality
type: behavior
versions: Python 2.6

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IDLE_paste_code.070918.patch
Type: application/octet-stream
Size: 5292 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20070918/173a1838/attachment.obj 

More information about the New-bugs-announce mailing list