Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

prettyprint print list/dict/tuple object prettily

Project description

This module privides pretty printing for list/dict/tuple/set python object.

Simple example of usage is followings

>>> from prettyprint import pp
>>> target = ['want pretty printing', '望麗出力']
>>> print target
['want pretty printing', '\xe6\x9c\x9b\xe9\xba\x97\xe5\x87\xba\xe5\x8a\x9b']  # what a ugly print especially in japanese
>>> pp(target)   # now we can see pretty print with pp
    "want pretty printing",
>>> target_dict = {'order': {'en':'pretty print', 'ja':'綺麗に出力せよ'}}
>>> print target_dict  # what a hell again
{'order': {'en': 'pretty print', 'ja': '\xe7\xb6\xba\xe9\xba\x97\xe3\x81\xab\xe5\x87\xba\xe5\x8a\x9b\xe3\x81\x9b\xe3\x82\x88'}}
>>> pp(target_dict)  # pp again
    "order": {
        "en": "print prettily",
        "ja": "綺麗に出力せよ"

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prettyprint, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size prettyprint-0.1.5-py2.6.egg (4.6 kB) File type Egg Python version 2.6 Upload date Hashes View
Filename, size prettyprint-0.1.5.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page