()
| 1 | import pygame.cdrom as face |
| 2 | |
| 3 | def main(): |
| 4 | face.init() |
| 5 | count = face.get_count() |
| 6 | if count == 0: |
| 7 | raw_input('There is no cdrom drive.') |
| 8 | elif count == 1: |
| 9 | cmd(face.CD(0)) |
| 10 | else: |
| 11 | num = which_CD(count) |
| 12 | if num != -1: |
| 13 | cmd(face.CD(num)) |
| 14 | face.quit() |
| 15 | |
| 16 | def which_CD(maximum): |
| 17 | print 'You have %s cdrom drives.' % maximum |