Dietmar Schwertberger wrote:
How useful is the current Copy/Paste Plus? E.g. you can't paste complete
examples as these include the output which would be re-executed as well.I could imagine that for the majority of people the use case of being able
to copy and paste multiple lines for re-use would be more useful.
Yes, I agree! In our application we also ran into the issue of not being able to paste code without blank lines before an un-indentation, as you mentioned earlier. I think this should really work by default.If nobody else needs the multi-line features, I can implement it for my
applications only - no problem.
If it's of general interest, we could implement it as standard.Then I see two options:
A)
- keep existing "standard" and "copy/paste plus" options
- add a third set of "copy/paste special" or "copy/paste multi" which
copies only the input lines and executes multi-line inputs without any
magic (e.g. no removal of prompts)
B)
- change "standard" copy and paste to copy or paste everything
(copy would work like a hard copy and include prompts and outputs,
paste would not apply any magic like removal of prompts)
- change "copy plus" to copy only input lines
- change "paste plus" to execute multi-line inputs
(either pure Python code only or optionally with automatic removal
removal of prompts)Option A) would result in three sets of Copy&Paste which I personally don't
find too nice or easy to understand. Paste Plus and Paste Special/Multi
could be merged, but I don't see this option for Copy.With B) the standard copy could still be used to produce doctest strings
while the "plus" versions would be useful for repeating things.
We would lose the possibility of copying input+output with stripped prompts,
but I don't see a use case for this.What do you think?
Out of those, option B sounds the best I think.
Thanks for your efforts in contributing!
- Mike