summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/cd/listcd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/sgi/cd/listcd.py')
-rwxr-xr-xDemo/sgi/cd/listcd.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/Demo/sgi/cd/listcd.py b/Demo/sgi/cd/listcd.py
deleted file mode 100755
index 2cfadb6..0000000
--- a/Demo/sgi/cd/listcd.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# List track info from CD player.
-
-import cd
-
-def main():
- c = cd.open()
- info = []
- while 1:
- try:
- info.append(c.gettrackinfo(len(info) + 1))
- except RuntimeError:
- break
- for i in range(len(info)):
- start, total = info[i]
- print 'Track', zfill(i+1), triple(start), triple(total)
-
-def triple((a, b, c)):
- return zfill(a) + ':' + zfill(b) + ':' + zfill(c)
-
-def zfill(n):
- s = `n`
- return '0' * (2 - len(s)) + s
-
-main()