[Idle-dev] Friendlier pasting of code
Tal Einat
taleinat at gmail.com
Fri Feb 9 01:23:57 CET 2007
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/ebaaa89e/attachment.htm
More information about the IDLE-dev
mailing list