# python-ast-visualizer **Repository Path**: mirrors_asmodehn/python-ast-visualizer ## Basic Information - **Project Name**: python-ast-visualizer - **Description**: Graphviz visualizations of Python ASTs - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-06-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #AST visualizer The script `astvisualizer.py` contained in this repository visualizes a Python AST trees. ## Installation First install the following requirements: * Python 3 * the dependencies listed in requirements.txt (`pip install -r requirements` or `pip3 install -r requirements` depending on your OS) Run the script `astvisualizer.py`. It accepts the input on stdin. Alternatively you might specify a file name as first parameter. ## Usage By default `astvisualizer.py` reads the Python code from stdin. If you only want to visualize a short snippet you can also pass it directly on the command line, f.e. `astvisualizer.py "print(3/2)"`. If you want to visualize an existing Python source code file, pass the file name using the `-f` switch, f.e. `astvisualizer.py -f test.py`.