def prettyPrintDictionary(d):
maxKeyLength = <NUM_LIT:0><EOL>maxValueLength = <NUM_LIT:0><EOL>for key, value in d.iteritems():<EOL><INDENT>maxKeyLength = max(maxKeyLength, len(key))<EOL>maxValueLength = max(maxValueLength, len(key))<EOL><DEDENT>for key in sorted(d.keys()):<EOL><INDENT>print ("<STR_LIT:%>"+str(maxKeyLength)+"<STR_LIT>" + str(maxValueLength)+ "<STR_LIT:s>") % (key,d[key])<EOL><DEDENT>
Pretty print a dictionary as simple keys and values