[IPython-dev] Interactive magic cells
Matthias Bussonnier
bussonniermatthias at gmail.com
Thu Jul 24 05:26:30 EDT 2014
Cells magic a pure kernel side stuff, they have no idea that they are coming from the notebook.
You will have to write javascript to do what you ask.
CodeMirror is the js library we use in which you type code in notebook.
Right now it is configured to send the code only wine you press Shift-Enter, you would have to configure it to send code more often.
Timer will be useless at the kernel as no way of knowing you are actually typing in the cell.
--
M
Le 24 juil. 2014 à 11:11, Akim Demaille a écrit :
>
> Le 23 juil. 2014 à 23:30, Fernando Perez <fperez.net at gmail.com> a écrit :
>
>> I don't think we expose anything at the single-keystroke level. All that happens client-side in the CodeMirror editor instance, so you'd have to hook into that event handling loop to trigger execution requests at your desired points (every keystroke, or every period, etc).
>
> So maybe a better option would be a timer? WDYT? I don't
> expect that there would be many such cells in the notebook,
> so I don't think there's a high scalability issue.
>
> I have no idea what CodeMirror is, and I'm afraid to dive
> in too many details I don't grasp :) What in your opinion
> would be the easiest way?
>
> Thanks in advance!
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
More information about the IPython-dev
mailing list