diff options
author | Agustin Zubiaga <aguzubiaga97@gmail.com> | 2012-02-08 23:20:33 (GMT) |
---|---|---|
committer | Agustin Zubiaga <aguzubiaga97@gmail.com> | 2012-02-08 23:20:33 (GMT) |
commit | 7e94c2a1d171c979941d0974553fd5b8969d08bc (patch) | |
tree | d4a7398e20fddbbad89cb4dd949a9b124f3a6d0d /readers.py | |
parent | 37584f755f5a2350e0fd6c98a368bffd02270ded (diff) |
pep8 fixes
Diffstat (limited to 'readers.py')
-rw-r--r-- | readers.py | 31 |
1 files changed, 17 insertions, 14 deletions
@@ -22,27 +22,30 @@ import cPickle + class StopWatch(): - + def set_data(self, data): self.data = cPickle.load(data) - - def get_stopwatchs_with_marks_count(self): + + def get_stopwatchs_with_marks(self): count = 0 + list = [] for i in self.data[-1]: - if i: count += 1 - - return count - - def marks_to_chart_data(self, num=0): - chart_data = [] + if i: + count += 1 + list.append([count, self.data[1][count - 1]]) + + return list, count + + def get_stopwatch_name(self, num=0): + return self.data[1][num] + + def marks_to_chart_data(self, num=0, chart_data=[]): marks_count = 0 - + for i in self.data[-1][num]: marks_count += 1 chart_data.append((str(marks_count), i)) - - return chart_data - - + return chart_data |