Nbtutor
Visualize Python code execution (line-by-line) in Jupyter Notebook cells. Inspired by Online Python Tutor
Install
Note: installing directly off this repo won't work, as we don't ship the built JavaScript and CSS assets. See more about developing below.
pip
pip install nbtutor
jupyter nbextension install --overwrite --py nbtutor
jupyter nbextension enable --py nbtutor
conda
conda install -c conda-forge nbtutor
jupyter nbextension install --overwrite --py nbtutor
jupyter nbextension enable --py nbtutor
Usage (Jupyter Notebook)
First load the nbtutor IPython kernel extension at top of the Notebook by executing the following magic in a
CodeCell:
%load_ext nbtutor
Then to visualize the execute of code in a CodeCell add the following magic to the top of the CodeCell
and execute it again:
%%nbtutor
Optional Arguments
There are also optional arguments that can be used with the cell magic:
-
Reset the IPython user namespace
%%nbtutor -r/--reset
-
Suppress the confirmation message from
-r/--reset%%nbtutor -r/--reset -f/--force
-
Specify the maximum frame depth to visualize (default: 3)
%%nbtutor -d/--depth N
-
Specify the maximum number of elements to visualize for "sequence" type objects (default: 5)
%%nbtutor --max_size S
-
Step through all frames (including frames from other cells and other global scopes altogether)
%%nbtutor --step_all
Notes
- If you find a problem please feel free to submit a GitHub Issue
Develop
Please see the DEVELOPMENT.md file
Metadata
Release files for nbtutor 2.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nbtutor-2.0.3.tar.gz | 618.5 kB | Without provenance | Details for nbtutor-2.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbtutor-2.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for nbtutor-2.0.3-py2.py3-none-any.whl |
Total release size: 809.3 kB
Release files / nbtutor-2.0.3.tar.gz
| Download URL | nbtutor-2.0.3.tar.gz |
|---|---|
| Size | 618.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b02ed69e39c1240055bec07cd0b902dd10d3332786c2f913e041538b312563d
|
|
BLAKE2b-256 checksum How to use checksums |
d41ddb9ce929a20abf5d7a1a234d83847314f9ccc84d67af05315a64f4be7937
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.2
|
Release files / nbtutor-2.0.3-py2.py3-none-any.whl
| Download URL | nbtutor-2.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 190.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6ac8101ea5fcc4b67b44b1c2b28df6ab7223fd78f1459bc632692bd574680993
|
|
BLAKE2b-256 checksum How to use checksums |
21341eea3231a2a15768a744a8af7f2c2023905d0f6d76ba54aee3be58e0ec21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.2
|
Security for nbtutor 2.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.