Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b108e97

Browse files
committed
Track info is now two triples instead of six number
1 parent d5d1912 commit b108e97

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Demo/sgi/cd/listcd.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ def main():
1111
except RuntimeError:
1212
break
1313
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)
14+
start, total = info[i]
15+
print 'Track', zfill(i+1), triple(start), triple(total)
1916

20-
def z(n):
17+
def triple((a, b, c)):
18+
return zfill(a) + ':' + zfill(b) + ':' + zfill(c)
19+
20+
def zfill(n):
2121
s = `n`
2222
return '0' * (2 - len(s)) + s
2323

0 commit comments

Comments
 (0)