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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pprintast-0.0.1.tar.gz.

File metadata

  • Download URL: pprintast-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pprintast-0.0.1.tar.gz
Algorithm Hash digest
SHA256 413ccfd05b64aa5226ec9b3c060bc7d1717b30909fa834713763669923ebdf14
MD5 d9e90ddaaeaf64354a64fc4d7b1a6d95
BLAKE2b-256 a9c16e5c85a94fa7fdd51b295aec36fdf1eccc65c3004984e84ed75785da871d

See more details on using hashes here.

File details

Details for the file pprintast-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pprintast-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pprintast-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a70d42943b6b8adfc853009592fbff2921816639d7de1fc5238529983784bad
MD5 7ff6f0272fd9320f6ce9d1abba4d7871
BLAKE2b-256 f836d201823dc3a4c001231af75e9645039db143523ada2a822fb39cb945783d

See more details on using hashes here.

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