diff options
author | Guido van Rossum <guido@python.org> | 1992-04-15 16:20:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-04-15 16:20:12 (GMT) |
commit | b108e976a409982aeadf52b5742de2cbba55542e (patch) | |
tree | aa27950c752abffc23cb4e97d1fba1171365f0ab /Demo/sgi | |
parent | d5d1912e28d94e7909132cd40ef5639bcf42bbfe (diff) | |
download | cpython-b108e976a409982aeadf52b5742de2cbba55542e.zip cpython-b108e976a409982aeadf52b5742de2cbba55542e.tar.gz cpython-b108e976a409982aeadf52b5742de2cbba55542e.tar.bz2 |
Track info is now two triples instead of six number
Diffstat (limited to 'Demo/sgi')
-rwxr-xr-x | Demo/sgi/cd/listcd.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/sgi/cd/listcd.py b/Demo/sgi/cd/listcd.py index 5017851..2cfadb6 100755 --- a/Demo/sgi/cd/listcd.py +++ b/Demo/sgi/cd/listcd.py @@ -11,13 +11,13 @@ def main(): except RuntimeError: break for i in range(len(info)): - start_min, start_sec, start_frame, \ - total_min, total_sec, total_frame = info[i] - print 'Track', z(i+1), - print z(start_min) + ':' + z(start_sec) + ':' + z(start_frame), - print z(total_min) + ':' + z(total_sec) + ':' + z(total_frame) + start, total = info[i] + print 'Track', zfill(i+1), triple(start), triple(total) -def z(n): +def triple((a, b, c)): + return zfill(a) + ':' + zfill(b) + ':' + zfill(c) + +def zfill(n): s = `n` return '0' * (2 - len(s)) + s |