Skip to main content

A short alias for the pprintpp or pprint module

Project description

pp can be installed with:

$ pip install pprintpp pp-ez

The pp package is just an alias for the pprintpp package (and falls back to the pprint package if pprintpp isn’t available), plus a bit of magic so it can be called directly:

>>> import pp
>>> pp(["Hello", "world"])
["Hello", "world"]
>>> pp.fmt([1, 2, 3])
'[1, 2, 3]'
>>> pp.pprint([1, 2, 3])
[1, 2, 3]
>>> pp.pformat([1, 2, 3])
'[1, 2, 3]'

By default, pp tries to use the pprintpp package, but if that is not available it will fall back to using pprint:

>>> import pp
>>> pp
<module 'pp' (pp_magic_module with pprint_mod='pprint')>
>>> pp.pprint_mod
<module 'pprint' from '.../lib/python2.7/pprint.pyc'>

See also: pprint++: https://pypi.python.org/pypi/pprintpp

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

pp-ez-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

pp_ez-0.1.0-py27-none-any.whl (3.2 kB view details)

Uploaded Python 2.7

File details

Details for the file pp-ez-0.1.0.tar.gz.

File metadata

  • Download URL: pp-ez-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pp-ez-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6dce2038348fe0d2f1c5f6bf221289ce14e49e7035139908f09db5048e37f748
MD5 0447ec49b74bdeefdcf0cd7b174154cf
BLAKE2b-256 1a9c026f3a23a80a7b13b3dc54d5c43d0135b9184ad3d2560026cf8a29e89768

See more details on using hashes here.

File details

Details for the file pp_ez-0.1.0-py27-none-any.whl.

File metadata

File hashes

Hashes for pp_ez-0.1.0-py27-none-any.whl
Algorithm Hash digest
SHA256 b4f4f4f5b7f498d17a884e86a46c9a9545ed71d440bcd49e7d6ada0f064aa86f
MD5 e5d336160d98a5d35a0e85f7c466ff38
BLAKE2b-256 238c83a6d5fa9bbf7e78232260d468740e3ce19499ef5ef0c8fb57db2cc51e9a

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