Run a tornado shell for easier development

27 views
Skip to first unread message

he...@amirathi.com

unread,
Apr 10, 2018, 12:11:30 PM4/10/18
to Project Jupyter
Hey, 
I am new to Jupyter development. I was wondering if there is a way to run a shell (similar to Django) that has Jupyter application initialised. 

So far I have tried this. That gives me access to all classes but I don't think it initializes the app with proper config. Specifically, when I try to access any config value in that shell, I get only the default values set inside the classes themselves. I am expecting it to pick configuration values stored in jupyter_notebook_config.json or jupyter_notebook_config.py. 

I briefly looked at setup.py & setupbase.py but didn't get any clue as to how to initialize the app inside the shell. Let me know if you have any pointers.

Thanks,
Amit


he...@amirathi.com

unread,
Apr 10, 2018, 2:22:48 PM4/10/18
to Project Jupyter
Nevermind, I figured it out. If anyone wants to run this in future.

I created shell.py with following:

#!/usr/bin/env python


import os

import readline

from pprint import pprint


from notebook import *

from notebook.notebookapp import NotebookApp

os.environ['PYTHONINSPECT'] = 'True'


Then ran 
python shell.py

& on the terminal

>>> app = NotebookApp()
>>> app.initialize()


 This should get you up & running.

Thomas Kluyver

unread,
Apr 10, 2018, 3:06:59 PM4/10/18
to Project Jupyter
+1 good figuring out!

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c9a41a5f-3434-438f-ba37-84942b8ece3b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages