projects
/
pywienerlinien
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
536dcf4
)
added utils function for sorting Departures
author
Florian Schweikert
<kelvan@logic.at>
Wed, 7 Dec 2011 21:03:30 +0000
(22:03 +0100)
committer
Florian Schweikert
<kelvan@logic.at>
Wed, 7 Dec 2011 21:03:30 +0000
(22:03 +0100)
gotovienna/utils.py
patch
|
blob
|
history
diff --git
a/gotovienna/utils.py
b/gotovienna/utils.py
index
c498288
..
2a15f6f
100644
(file)
--- a/
gotovienna/utils.py
+++ b/
gotovienna/utils.py
@@
-9,3
+9,8
@@
def ingreen(x):
def inblue(x):
return '\033[94m' + x + '\033[0m'
+def sort_departures(dep):
+ print 'sorting ...'
+ d = sorted(dep, lambda x, y: cmp(x['atime'], y['atime']))
+ print map(lambda x: x['atime'], d)
+ return d