Copying multiple cells, input and output, and pasting to outside applications?

8,684 views
Skip to first unread message

Jean Bigboute

unread,
May 15, 2017, 1:54:22 AM5/15/17
to Project Jupyter
I would like to send sample cell inputs and outputs to colleagues who use Python but who don't use the Notebook.

I can multiselect cells and copy via Ctrl-C but on pasting into, say, an email, only the first Input pastes.  I have to manually copy and paste the other inputs and outputs.

Additionally, the In[#] and Out[#] don't carry over so I have to type those back in. 

Any suggestions of how to do this without so much effort?

--- JBB

Thomas Kluyver

unread,
May 15, 2017, 6:40:59 AM5/15/17
to Project Jupyter
You may have better results copying from the notebook converted to HTML. The easiest way to see this conversion is to select 'print preview' from the notebook file menu.

Thomas

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/628d0ed2-f9b5-4da7-9fe0-49bfc0be7eb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean Bigboute

unread,
May 15, 2017, 10:10:51 AM5/15/17
to Project Jupyter
Thanks.  I can now multi-copy and paste cell contents. 

Is there a way to include the In[#] and Out[#] blocks in the copy operation?

--- JBB


On Monday, May 15, 2017 at 3:40:59 AM UTC-7, takowl wrote:
You may have better results copying from the notebook converted to HTML. The easiest way to see this conversion is to select 'print preview' from the notebook file menu.

Thomas
On 15 May 2017 at 06:54, Jean Bigboute <jeanbi...@gmail.com> wrote:
I would like to send sample cell inputs and outputs to colleagues who use Python but who don't use the Notebook.

I can multiselect cells and copy via Ctrl-C but on pasting into, say, an email, only the first Input pastes.  I have to manually copy and paste the other inputs and outputs.

Additionally, the In[#] and Out[#] don't carry over so I have to type those back in. 

Any suggestions of how to do this without so much effort?

--- JBB

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Thomas Kluyver

unread,
May 15, 2017, 10:35:10 AM5/15/17
to Project Jupyter
On 15 May 2017 at 15:10, Jean Bigboute <jeanbi...@gmail.com> wrote:
Is there a way to include the In[#] and Out[#] blocks in the copy operation?

Not easily. It appears to use CSS 'user-select: none' to prevent selecting the prompts. You can disable the CSS rules for this in your browser's inspector, then select and copy them. Or you may be able to write a custom HTML export template which overrides that rule.

Thomas

Jean Bigboute

unread,
May 15, 2017, 11:53:04 AM5/15/17
to Project Jupyter
Ok thanks. That kind of customization is beyond me.

I think I'll migrate to the terminal/(i)python interface that my colleagues are using for this.

Reply all
Reply to author
Forward
0 new messages