🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

prettyprint

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettyprint

prettyprint print list/dict/tuple object prettily

0.1.5
PyPI
Maintainers
1

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": "綺麗に出力せよ"
       }
   }

Keywords

pretty print

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts