Skip to main content

A AST pretty printer for python.

Project description

pprintast

PyPi release

An AST (abstract syntax tree) pretty printer for Python 🐍.

Installation

$ pip install pprintast

Usage

Script

# 1. pretty print AST from "file".
pprintast "./path/to/script.py"

Module

# 1. import the "pprintast" function.
from pprintast import pprintast as ppast

# 2. retty print AST from "string".
exp = "lambda a: a**2"

ppast(exp)

stdout

License

MIT © Travis Clarke

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

pprintast-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

pprintast-0.0.1-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

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