Tools for working with Python source code listings.
This package was created to facilitate the following workflow:
- Write some code in a Jupyter notebook.
- Export that code to a Python file. (This can be accomplished with
jupyter nbconvert --to python your_jupyter_notebook.ipynb) - Run the Python file and annotate every line with what gets written to stdout and stderr. (This is accomplished using the pylisting-annotate command.)
- Split the annotated file into individual files, one for each cell in the original Jupyter notebook. (This is accomplished using the pylisting-split command.)
- Embed the annotated code from various cells in a LaTeX document using the listings package.