Run jupyter laptop and bind to existing kernel

I know about nbconvert and use it to generate static html or ipynb files with output results. However, I want to be able to generate a laptop that remains attached to the kernel that I already have, so that I can continue to research the data after all the cells in the template have been started. Is there any way to do this?

+7
ipython jupyter-notebook jupyter nbconvert
source share
2 answers

Not quite sure about your goal. But my general solutions are:

  • execute notepad on the command line and view execution at the same time,

    jupyter nbconvert --debug --allow-errors --stdout --execute test.ipynb

this will show execution through all cells in debug mode, even if an exception occurs. but I can’t see the result until the end of the run.

  1. to output the result to an html file, and then open the html file to see the results. I found this to be more convenient.

    jupyter nbconvert --execute --allow-errors --stdout test.ipynb β†’ result.html 2> & 1

if you open result.html, it will be, enter image description here

and all errors and results will be shown on the page.

I would like to know other answers / solutions from all of you. thanks.

+1
source share

If I understand correctly, do you want to open the Python console and connect the Jupyter laptop to this kernel instance?

Perhaps your solution would be to edit the jupyter scripts themselves and start the server in a separate thread / background task that implements some kind of connection between the threads and work in the jupyter console? This is currently not possible because the main thread starts the server.

It will take some work and I don't have any as-is solution, but I will consider it and maybe edit this answer if I can get it to work.

But it seems that the easiest solution is to simply add another field to the notebook and do whatever you want to do. Is there any reason not to do this?

+1
source share

All Articles