I tried to highlight a section of code to paste, and I got the input prompt characters as well. In all highlight, copy/paste operation, the cell prompts should always be considered off-limits, so that users can copy/paste multiple lines of code without either the prompts or the '...' markers getting in the way.
A bit more diagnostics:
1. If I highlight a single line of valid python (say 'print 10'), I can copy (Ctrl-C) and paste (Ctrl-V) OK. Executing the pasted line works.
2. If, in a cell, I Shift-ArrowUp to naively pick up the previous cell, I get the prompts picked up. In that case, Ctrl-C is OK, but as soon as I hit Ctrl-V I get a traceback:
Traceback (most recent call last):
File "/usr/local/home/fperez/usr/local/lib/python2.4/site-packages/nbshell/ipnNotebookWidget.py", line 32, in <lambda>
wx.EVT_KEY_DOWN(self, lambda evt:CellCtrlBase.KeyDown(self,evt))
File "/usr/local/home/fperez/usr/local/lib/python2.4/site-packages/nbshell/ipnNotebookWidget.py", line 86, in KeyDown
self.OnKeyDown(evt)
File "/home/fperez/usr/local/lib/python2.4/site-packages/nbshell/PythonWidget.py", line 347, in OnKeyDown
self.Paste()
File "/home/fperez/usr/local/lib/python2.4/site-packages/nbshell/PythonWidget.py", line 817, in Paste
self.view.Paste()
File "/home/fperez/usr/local/lib/python2.4/site-packages/nbshell/PythonPlugin.py", line 842, in Paste
elif (wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)) or
NameError: global name 'DF_UNICODETEXT' is not defined
After this, further attempts fail.
3. Highlighting multiline input seems to work if you start from the top of a multiline cell. While the highlight shadow covers the '....' continuation marks, the copy/paste operation works correctly. This is how it should also work if one starts the highlight from below (and the .... should not be highlighted).