[PyCrust] Smart cut/copy/paste
Brought to you by:
pobrien
From: Patrick K. O'B. <po...@or...> - 2001-10-22 23:33:18
|
The CVS version of PyCrust now has basic "smart" cut/copy/paste!!! I'll add a few more bells and whistles, but the current implementation has most of what you might want. What might that be? Well, all calls to cut/copy/paste are intercepted and translated to deal with line endings, secondary prompts, etc. For example, that means you can copy a function definition from a source file and paste it into the PyCrust shell and the line endings (of any style) will convert to os.linesep + sys.ps2. Likewise, commands selected in the shell will be stripped of their secondary prompts so you can paste them into a source file or email without having to delete all the "... " prefixes. What I intend to add next is a way to control whether or not to strip out the prompts when you cut or copy. I'd like to make this work with the default keybindings for cut and copy, so one idea I had was that if the selection *included* the primary prompt ">>> ", then all the secondary prompts would be left intact. If the selection did *not* include the primary prompt, then all the secondary prompts would be stripped out. Does that sound like a reasonable feature? Once again, I invite you to sample our latest creation and give it a nibble. --- Patrick K. O'Brien Orbtech "I am, therefore I think." |