Skip to content

Instantly share code, notes, and snippets.

View clamm's full-sized avatar

Cindy Lamm clamm

  • Munich, Germany
View GitHub Profile
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr']
def human_log(res):
if type(res) == type(dict()):
for field in FIELDS:
if field in res.keys():
encoded_field = res[field].encode('utf-8')
print '\n{0}:\n{1}'.format(field, encoded_field)