1 # yet another way to display records...
2 def beginning(foo, size=15):
6 return full[:size - 3] + '...'
9 def printable(record_s):
11 if isinstance(record_s, list):
12 return "[" + "\n".join([printable(r) for r in record_s]) + "]"
13 if isinstance(record_s, dict):
14 return "{" + " , ".join(["%s:%s" % (k, beginning(v)) for k, v in record_s.iteritems()]) + "}"
15 if isinstance(record_s, str):
17 return "unprintable [[%s]]" % record_s