An IPython notebook plugin for visualizing ASTs.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
showast
.gitattributes
.gitignore
Example.ipynb
LICENSE.txt
README.md
optional-requirements.txt
requirements.txt
setup.cfg
setup.py

README.md

showast

PyPI version Liberapay receiving

An IPython/Jupyter notebook plugin for visualizing abstract syntax trees.

Example usage

Examples can be found in this IPython notebook.

import showast
%%showast
print 1 + 2

print 1 + 2 AST

from showast import show_source
import antigravity
show_source(antigravity)

antigravity module AST

Installation

pip install showast

showast has the following Python dependencies:

ipython
graphviz

You will also need to have Graphviz installed.

Use of the alternative nltk-based rendering engine requires the following packages:

nltk
pillow

When using this option, you will additionally need to have Ghostscript installed.

Contacts