Python Abstract Syntax Tree viewer/browser in Qt.
-
Install PySide: http://qt-project.org/wiki/Category:LanguageBindings::PySide
-
Run the installer:
%> sudo python setup.py install
-
Command line example:
%> pyastviewer myprog.py
-
Examples to use from within Python:
>>> from astviewer import view >>> view(file_name='myprog.py', width=800, height=600) >>> view(source_code = 'a + 3', mode='eval')
The Green Tree Snakes documentation on ASTs is available for those who find the Python ast module documentation too brief.