How can I run cells not in sequence? (I'm asking for how it is implemented)

37 views
Skip to first unread message

Muhammad Fayed

unread,
Jan 29, 2020, 12:58:20 PM1/29/20
to Project Jupyter
I'm trying to make a software similar to Jupiter notebook, but for the blind. That's because the edit box of the cell is not accessible with any screen reader for some reason I don't know. 
Second reason, I'm a person of terminal and like typing all the time and don't want to bother myself with navigating across a webpage. 
Could you please help me know how I could satisfy the following scenario? It explains how I could run separate cells without caring too much for sequence and running the same cell twice) 
My scenario:
assume I have a directory containing my project files. 
1. Run some cells.run_cell(1), run_cell(2), and run_cell(3).
2. I could edit cell #3.
3. Just run cell #3 run_cell(3) and it could work without requiring to retype the imports from the first cell or face the issue that it couldn't find the variable 'x' from the second cell. 

Any help would be truly appreciated.
Thank you so much,
Sincerely,
Mohamed E. Fayed 

Roland Weber

unread,
Jan 30, 2020, 2:11:30 AM1/30/20
to Project Jupyter
When you execute cells in the Web UI, the browser sends the code of the cells to be executed to the notebook server. The server itself doesn't know about cells, it just gets code snippets for execution. Your alternative implementation of a console-based UI will have to work in a similar fashion: extract the cells from the notebook, send the actual code for execution to the server, re-insert the results of the execution into the notebook.

I guess Jupyter Console has logic for sending code snippets and printing results that you can re-use:

hope that helps,
  Roland

Roland Weber

unread,
Jan 30, 2020, 2:23:47 AM1/30/20
to Project Jupyter
You might want to have a look at qtconsole as well, for additional inspiration:

Muhammad Fayed

unread,
Feb 10, 2020, 8:55:15 AM2/10/20
to jup...@googlegroups.com
Thanks a lot  I’ll check the website.     
I’m sorry for the late reply.  The mail was considered as a spam. 
Thank you again. 
Sincerely 
Mohamed E. Fayed 

Sent from my iPhone

On Jan 30, 2020, at 9:11 AM, Roland Weber <rolw...@de.ibm.com> wrote:


--
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/0380f2f0-4d87-4055-a834-90e9ff980e0c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages