Skip to main content

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.

Source Distribution

prettyprint-0.1.5.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

prettyprint-0.1.5-py2.6.egg (4.6 kB view details)

Uploaded Source

File details

Details for the file prettyprint-0.1.5.tar.gz.

File metadata

  • Download URL: prettyprint-0.1.5.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for prettyprint-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7423210b62adfb3777677914cd25db4919f1c2b0afba0454365ffbfa3f7e3731
MD5 177bad3e6804ced7c817511622052121
BLAKE2b-256 139c495a32e19f94fdd402bffc1c90abd84f2f604595ab480a3087dd77a94502

See more details on using hashes here.

File details

Details for the file prettyprint-0.1.5-py2.6.egg.

File metadata

File hashes

Hashes for prettyprint-0.1.5-py2.6.egg
Algorithm Hash digest
SHA256 ee3fdb0a463b421d326ba3ed2891f1927eb4193abedf81c9937bc1deae0f958a
MD5 c30f9623cb2a88a3eb3f8138b4f04440
BLAKE2b-256 3e47391c122b20d59699aab7d42485f5155cf6ebcb67d2ab9e66ebac026cfed2

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