Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jupyter notebook integration #9

Open
sloria opened this issue Apr 5, 2017 · 3 comments
Open

Add Jupyter notebook integration #9

sloria opened this issue Apr 5, 2017 · 3 comments

Comments

@sloria
Copy link
Owner

sloria commented Apr 5, 2017

konch -s notebook

This should open a Jupyter notebook with `context included.

@sloria
Copy link
Owner Author

sloria commented Apr 5, 2017

It would be nice to display the context (possibly in a markdown cell) in the first cell of the notebook.

@brl0
Copy link

brl0 commented Jun 7, 2019

I really like this idea, and was doing some quick digging. I came across Jupytext which may help.
The following converts the .konchrc file to a notebook:
konchrc = jupytext.readf('.konchrc', fmt='py')
jupytext.writef(konchrc, 'konchrc.ipynb', fmt='ipynb')

Let me know your thoughts and I would be happy to try to help move this along.

@brl0
Copy link

brl0 commented Jun 20, 2019

I just learned that IPython (and Jupyter) use Traitlets.

Traitlets is a framework that lets Python classes have attributes with type checking, dynamically calculated default values, and ‘on change’ callbacks.
The package also includes a mechanism to use traitlets for configuration, loading values from files or from command line arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants