Created
February 13, 2014 20:08
-
-
Save daryltucker/8982831 to your computer and use it in GitHub Desktop.
Python Pretty Print Helper Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
def pp(data, ro=False): | |
"""Format for pretty print.""" | |
if not ro: | |
pprint.pprint(data, indent=4, width=10) | |
return pprint.pformat(data, indent=4, width=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment