[IPython-User] notebook reusing cell blocks with a ! possible?

Matthias BUSSONNIER bussonniermatthias@gmail....
Mon Nov 26 12:19:15 CST 2012


Le 26 nov. 2012 à 19:07, Dennis Daniels a écrit :

> Greetings
> 
> I'm writing ipynbs tutorials and would like to know how I can reuse a cell block by calling on the cellblock number

Hi, 

You can use %rerun to rerun from history and %recall to load the code into the next cell.

both magic take an history number, not a cell number, so I'm not sure this is what you wish.

There are no (easy) way for now to refer to a particular cell in the notebook.
-- 
Matthias


> 
> eg: 
> cell [3] contains
> 
> print('fu')
> 
> I want to use the content of cell [3]
> in cell [x]
> e.g.
> print ('content of cell 3')
> print('bar')
> 
> With bash it would be
> (bang)!3
> 
> e.g.
> cell[x]
> !3
> print('bar')
> 
> What is the command string for Ipython Notebook to achieve same, if it is possible at all?
> 
> thank you
> Dennis
> lost and found:
> 
> 0018586833669 (google)
> GoogleTalk: dennisgdaniels
> 
> skype: dennisdaniels
> 
> 0015047227525 (only emergencies)
> 
> 
> EOF
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user



More information about the IPython-User mailing list