8000 GitHub - aminamid/pp: python pretty printer for python objects, json, or yaml. · GitHub
[go: up one dir, main page]

Skip to content
aminamidPublic

About

python pretty printer for python objects, json, or yaml.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

colorpp.py print some python objects.

>>> import colorpp
>>> colorpp.pprint("test")
>>> colorpp.pprint( {"id": 65535, "value": 3.14, "list": [1,2,3] } )

>>> import logging
>>> logging.basicConfig()
>>> logging.warning( colorpp.pprintf(object) )

From commandline, colorpp.py without args read sys.stdin , and try to parse as json, or yaml. If there is argument, colorpp.py open the file, and try to parse as json, or yaml.

$ echo '{ "msg": "this is json" }' | colorpp.py
$ echo '{ msg: this is yaml }' | colorpp.py
$ echo '{ "msg": "this is file" }' > smpl.json
$ colorpp.py smpl.json 

About

python pretty printer for python objects, json, or yaml.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0