Skip to main content

IPython notebook plugin for visualizing abstract syntax trees.

Project description

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

Example usage

Examples can be found in [this IPython notebook](https://github.com/hchasestevens/show_ast/blob/master/Example.ipynb).

`python import showast `

`python %%showast print 1 + 2 ` ![print 1 + 2 AST](http://i.imgur.com/vK3XTkX.png)

`python from showast import show_source import antigravity show_source(antigravity) ` ![antigravity module AST](http://i.imgur.com/NJY6xhw.png)

Installation

` pip install showast `

showast has the following Python dependencies: ` ipython graphviz `

You will also need to have [Graphviz](http://www.graphviz.org/Download..php) 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](http://ghostscript.com/download/gsdnld.html) installed.

Contacts

Project details


Download files

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

Source Distribution

showast-0.2.4.zip (8.4 kB view hashes)

Uploaded source

Built Distribution

showast-0.2.4-py2-none-any.whl (7.1 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page