Skip to content

Instantly share code, notes, and snippets.

@bendikro
Last active August 29, 2015 13:57
Show Gist options
  • Save bendikro/9532813 to your computer and use it in GitHub Desktop.
Save bendikro/9532813 to your computer and use it in GitHub Desktop.
def cell_data_time(column, cell, model, row, data):
"""Display value as time, eg 1m10s"""
time = model.get_value(row, data)
if func_last_value.get(column.title, None) == time:
return
func_last_value[column.title] = time
if time <= 0:
time_str = ""
else:
time_str = common.ftime(time)
cell.set_property('text', time_str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment