Skip to content

Instantly share code, notes, and snippets.

View acx2015's full-sized avatar

Alex Chamberlain acx2015

  • Intel Corp.
  • Hillsboro, OR
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)