Skip to content

alytle/nbimporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nbimporter

Import IPython Notebooks as modules (with Jupyter v4).

Updated from module collated here:

Origin

This is a modified version of code originally collated from https://github.com/adrn/ipython/blob/master/examples/Notebook/Importing%20Notebooks.ipynb Check out that notebook for full documentation and to understand the backgrounds.

Installation

pip install nbimporter

Usage

Notebook foo.ipynb:

In[1]:

def a(): 
    print("Hello World!")

Notebook bar.ipynb:

In[1]:

import nbimporter
from foo import a #import from notebook

a()

Out[1]:

Hello World!

About

Import ipython notebooks as modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%