(disc)
| 28 | print 'The number is out of range.' |
| 29 | |
| 30 | def cmd(disc): |
| 31 | disc.init() |
| 32 | total = disc.get_numtracks() |
| 33 | table = map(disc.get_track_audio, range(total)) |
| 34 | if sum(table) == 0: |
| 35 | print 'This is not an audio CD.' |
| 36 | else: |
| 37 | index = {} |
| 38 | count = 0 |
| 39 | for i, b in enumerate(table): |
| 40 | if b: |
| 41 | count += 1 |
| 42 | index[count] = i |
| 43 | cmd_line(disc, index) |
| 44 | disc.stop() |
| 45 | disc.quit() |
| 46 | |
| 47 | def cmd_line(disc, index): |
| 48 | while True: |
no test coverage detected