Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5d1912 commit b108e97Copy full SHA for b108e97
1 file changed
Demo/sgi/cd/listcd.py
@@ -11,13 +11,13 @@ def main():
11
except RuntimeError:
12
break
13
for i in range(len(info)):
14
- start_min, start_sec, start_frame, \
15
- total_min, total_sec, total_frame = info[i]
16
- print 'Track', z(i+1),
17
- print z(start_min) + ':' + z(start_sec) + ':' + z(start_frame),
18
- print z(total_min) + ':' + z(total_sec) + ':' + z(total_frame)
+ start, total = info[i]
+ print 'Track', zfill(i+1), triple(start), triple(total)
19
20
-def z(n):
+def triple((a, b, c)):
+ return zfill(a) + ':' + zfill(b) + ':' + zfill(c)
+
+def zfill(n):
21
s = `n`
22
return '0' * (2 - len(s)) + s
23
0 commit comments