daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def pprintDict(d, indent=None, sort_keys=None):
  2.     """
  3.    Pretty print a dictionary object.
  4.    
  5.    @param text: The json string to output.
  6.    @type text: <string>
  7.    @param indent: Number of spaces to use.
  8.    @type indent: <int>
  9.    @param sort_keys: If the keys should be sorted.
  10.    @type sort_keys: <boolean>
  11.    """
  12.     if(indent is None): indent = 4
  13.     if(sort_keys is None): sort_keys = False
  14.     pp = pprint.PrettyPrinter(indent, sort_keys)
  15.     pp.pprint(d)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top