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

Matthias BUSSONNIER bussonniermatthias@gmail....
Tue Jan 15 03:30:25 CST 2013


Hi, 

To comments along the way. 

Cross Copy Past make sense in that cell also have metadata that could be copied along. 

There is a notebook flag to save py script each time you save a notebook so that you can 'import' your code.

-- 
Matthias


Le 15 janv. 2013 à 08:34, Chao YUE a écrit :

> Thanks a lot for response. This feature might no be necessarily very useful. 
> for me, the usage might be you have a "draft" notebook where you use interactive play. 
> in this notebook you may have many cells but each cell only 1-2 lines. Then 
> I use %save my_clean_code.py 20-40 (let's say I want 20-40 lines that are already clean
> and will be saved for future use.), then again with %loadpy my_clean_code.py I can load them
> again into a new cell. Now I would like to copy this cell to another clean notebook for storing the 
> code (with better, clean visual feelings). Because I think notebook with its text and title features
> is actually a better tool to store code than files. 
> 
>  Chao
> 
> On Tue, Jan 15, 2013 at 12:37 AM, Brian Granger <ellisonbg@gmail.com> wrote:
> This is something we have thought about doing, but we haven't gotten to it yet.
> 
> On Mon, Jan 14, 2013 at 3:35 PM, Paul Hobson <pmhobson@gmail.com> wrote:
> > On Mon, Jan 14, 2013 at 2:00 PM, Chao YUE <chaoyuejoy@gmail.com> wrote:
> >>
> >> Dear all,
> >>
> >> Suppose I have notebook1 and notebook2, they are now listed in the same
> >> notebook session.
> >>
> >> Could I copy one cell from notebook1 to notebook2?
> >> by this way I can play in notebook1 but put all the tested codes neatly in
> >> notebook2.
> >>
> >> cheers,
> >>
> >> Chao
> >
> >
> > Chao,
> >
> > I don't think I fully understand what behavior and perhaps (user-interface)
> > feature you would like to see. I'm struggling to imagine a menu item or
> > keyboard shortcut that would be simpler and faster than simply copying the
> > text of an existing cell in notebook1 into a new cell in notebook2.
> >
> > If you need to copy over many cells at once, I would recommend simply
> > copying the notebook ("Make a Copy" in the "File" menu).
> > -paul
> >
> > _______________________________________________
> > IPython-User mailing list
> > IPython-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-user
> >
> 
> 
> 
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu and ellisonbg@gmail.com
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
> 
> 
> 
> -- 
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130115/d2749ff7/attachment-0001.html 


More information about the IPython-User mailing list