[Idle-dev] Friendlier pasting of code

Tal Einat taleinat at gmail.com
Fri Feb 9 12:40:21 CET 2007


Sorry, Gmail seems to have barfed my attachment. I'm attaching the patch
again, hopefully it will work this time!

On 2/9/07, Tal Einat <taleinat at gmail.com> wrote:
>
> To follow up the suggestion by John Bollinger regarding moving code
> between editor and shell windows:
>
> I've written up an initial patch for IDLE which adds a Paste Code item in
> the Edit menu (and a Control+Shift+V hotkey for it).
>
> Selecting this option pastes the code from the clipboard, but with
> adjustments:
> * Remove prompt characters (currently ">>> " or "... ", to also support
> code from a command-line Python shell)
> * When pasting to a shell, remove empty lines (i.e. all whitespace
> characters)
>
> These adjustments are applied only to lines of code (multi-line strings
> are not changed).
>
>
> Attached is unified diff to the current idlelib SVN (rev. 53679).
>
> Please take a moment to install and test this, report comments and bugs,
> and tell me what you think.
> If you like it, I'll post the patch in SourceForge.
>
> Enjoy!
> - Tal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/idle-dev/attachments/20070209/e2022e08/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IDLE_paste_code.070209.patch
Type: application/octet-stream
Size: 4503 bytes
Desc: not available
Url : http://mail.python.org/pipermail/idle-dev/attachments/20070209/e2022e08/attachment.obj 


More information about the IDLE-dev mailing list