[IPython-dev] Playing with cells in the notebook... and some problems.

Matthias Bussonnier bussonniermatthias at gmail.com
Thu Aug 8 12:28:55 EDT 2013


Window is the global object. You can do window.ccell = ccell pretty much everywhere ccell in defined. Then you can just access ccell from te JavaScript console

Envoyé de mon iPhone

Le 8 août 2013 à 18:12, Damián Avila <damianavila at gmail.com> a écrit :

> El 08/08/13 03:26, Matthias BUSSONNIER escribió:
>> 
>> Le 8 août 2013 à 08:01, Damián Avila a écrit :
>> 
>>> In this way, I get the a copy of the cell but it is not executable…
>> 
>> 
>> Yes it is, Shift-Enter is just not bound to it. 
>> Shift-Enter is handled by IPython.notebook and is bound to execute selected cell
>> 
>> As notebook object does nt know of your cell, you are just sending the execute request to the wrong cell.
>> 
>> adding this : 
>> 
>> window.ccell = cell;
>> 
>> and then ccell.execute() in JSconsole works.
>> 
>> -- 
>> M
>> 
>> 
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 
> I do not understand what `window.ccell = cell;` is doing... so I do     not know where to add it... ;-)
> 
> Damián. 
> 
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130808/fefb43dc/attachment.html>


More information about the IPython-dev mailing list