[IPython-User] copy one cell from one notebook to another

Matthias BUSSONNIER bussonniermatthias@gmail....
Tue Jan 15 04:40:39 CST 2013

Le 15 janv. 2013 à 11:26, Aaron Meurer a écrit :

> I was thinking that this could be useful in some other ways too. I'm
> supposing that you'll implement this as just copying the relevant part
> of the notebook json file to the clipboard.  If you do it like this,
> that opens up possibilities.  One could use this to do raw
> modification of the json data in a relatively safe way.

No, not full cell Json too complicated. Too risky.
The notebook already produce not as compliant Json 
structure than what we wish.

but recent merge of 
already add the possibility to do it with metadata.

>  Rather than
> trying to edit the notebook file itself, which could be dangerous if
> you mess up, you could just copy the cells you want to edit, paste it
> into your text editor, do the modification, and repast them into the
> notebook, which would assumedly do error checking first. Furthermore,
> if you just use the raw format, someone could just copy the text
> directly from the notebook and "paste" it into another (i.e., copy
> with a text editor and paste with the notebook).
> If you allow the ability to copy and paste several cells at once
> (which you obviously should), this could also make things much more
> efficient than any other method of moving cells from one notebook to
> another, or merging two notebooks.

Cross notebook we could use the storage API.

> https://github.com/jonrohan/ZeroClipboard is what GitHub uses to
> access the clipboard (according to
> https://github.com/blog/1365-a-more-transparent-clipboard-button, the
> only reliable way to do it is using Flash).  You could probably also
> just use a poor-man's method, which would be to just give the user the
> text and have him copy it manually, and visa-versa for paste.
> Apparently even with Flash, the user must initiate the clipboard
> access with a click.

I would still really like to avoid flash. Html5 have a draft of clipboard API
hopefully it will be available soon enough.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130115/4cc8a5ca/attachment.html 

More information about the IPython-User mailing list