Skip to content

anisg/pycool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycool, simple script library

install

$ pip install pycool

usage

pretty.py:

#!/usr/bin/env python
from pycool import *

args = parse('prettyprint a json file',[
        ('jfile',{'help':'path to json file'}),
        ('-i','--indent',{'action':'store_true'})
        ])

s = jget(args.jfile)
i = args.indent

print(jdumps(s, indent=i))

in shell:

$ python pretty.py -h
$ python pretty.py -i path/to/json

note

  • works with python 2 and 3
  • resolves utf-8 encoding problem with python 2

About

simple script library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages