Where to find main functionalities of notebook?

18 views
Skip to first unread message

Muhammad Fayed

unread,
Dec 13, 2020, 1:34:47 AM12/13/20
to jup...@googlegroups.com
Hi,

Assumption: I assume that the notebook code is organized in MVC design pattern in order to make my words easier to understand.

I’m searching in the Jupiter notebook GitHub repo for the code of the model. Where could I find it exactly?
Is there a controller? Where is it?

For example to what I want, I want to know whether the code for generating new cell, running specific cell, run all, ...

Thank you so much,

Regards,

Mohamed E. Fayed

Matthias Bussonnier

unread,
Dec 13, 2020, 7:41:02 PM12/13/20
to jup...@googlegroups.com
Hi Mohamed,

in Classic notebook, here is the function that abstract executing code :

https://github.com/jupyter/notebook/blob/0c83c9d59f5ba22b3a09b7db4ebcf3af881ffc53/notebook/static/services/kernels/kernel.js#L728-L793

Here is the part that is triggered on click or on keyboard shortcut to
execute current cell:

https://github.com/jupyter/notebook/blob/0c83c9d59f5ba22b3a09b7db4ebcf3af881ffc53/notebook/static/notebook/js/notebook.js#L2424-L2445

The code of the classic notebook is relatively old; and might not use
common JS idioms, you might want to look into jupyterLab as well;
--
M
> --
> You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/11230E25-E30B-48A5-9FFE-228E41BF1726%40gmail.com.

Muhammad Fayed

unread,
Dec 14, 2020, 4:38:35 AM12/14/20
to jup...@googlegroups.com
Thanks for the follow up.

I will take time to reach what I want, so my replies may be late.

Another question please, what is the use of Javascript and Python in the notebook? In which tasks, they use python and which tasks they use JS??

Thank you so much,

Regards,

Mohamed E. Fayed

> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CANJQusX9fC9j%2BGd%2BT%3DO1W0rU2%2BLF%3Dh6VcNB86qocg4HuDq47Mw%40mail.gmail.com.

Muhammad Fayed

unread,
Dec 14, 2020, 4:41:36 AM12/14/20
to jup...@googlegroups.com
BY THE WAY, my target is to use already existing functionalities but with different interface. One of the key reasons for investigating time in Jupiter notebook itself is just editing in the file.ipynb similarly to that in notebook as if I am using notebook itself.

Regards

Mohamed E. Fayed

Robert Schroll

unread,
Dec 14, 2020, 5:02:56 AM12/14/20
to jup...@googlegroups.com, jup...@googlegroups.com
On Dec 14 2020, at 1:38 am, Muhammad Fayed <m10f...@gmail.com> wrote:
Another question please, what is the use of Javascript and Python in the notebook? In which tasks, they use python and which tasks they use JS??

Muhammad Fayed

unread,
Dec 14, 2020, 11:33:52 PM12/14/20
to jup...@googlegroups.com
Yes it does. Thank you so much. 😊

Regards,

Mohamed E. Fayed

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages