Skip to main content

IPython Notebook code reuse

Project description

IPython notebook are great for development and visualzing data, however, in terms of code sharing and reusing they’re quite bad.

If you want to reuse your notebook as a program or import functionality into other modules, you have a problem. Yes, you can move your code into a separate module but then you loose then notebook interface and the ability to change it.

This package contains several utilities to reuse the code in your notebook without the need to export/convert it everytime.

To import a notebook into another module do the following:

import ipnb.importer import my_notebook


You can also run a notebook directly from the command line:

python -m /path/to/my_notebook.ipynb

Optionally specify ‘-s’ to print the source code to stderr before execution starts and ‘-d’ to debug the notebook. Currently the implementation will try to use PuDB and fallback to pdb

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ipnb-0.1.0.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page