Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Chamberlain acx2015

  • Intel Corp.
  • Hillsboro, OR
View GitHub Profile
View human_log.py
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)