Exemplo n.º 1
0
def main():
    face.init()
    count = face.get_count()
    if count == 0:
        raw_input('There is no cdrom drive.')
    elif count == 1:
        cmd(face.CD(0))
    else:
        num = which_CD(count)
        if num != -1:
            cmd(face.CD(num))
    face.quit()
Exemplo n.º 2
0
def main():
    face.init()
    count = face.get_count()
    if count == 0:
        raw_input('There is no cdrom drive.')
    elif count == 1:
        cmd(face.CD(0))
    else:
        num = which_CD(count)
        if num != -1:
            cmd(face.CD(num))
    face.quit()
Exemplo n.º 3
0
import sys, os, pygame, time
import pygame.cdrom as cdrom

while 1:
    cdrom.init()
    cd = cdrom.CD(0)
    cd.init()
    cd.eject()
    cd.quit()
    cdrom.quit()
time.sleep(5)
Exemplo n.º 4
0
import time

while True:
        import pygame.cdrom as cdrom
        cdrom.init()
        cd = cdrom.CD(0) # 0 = first cdrom device
        cd.init()
        cd.eject()
        cd.quit()
        cdrom.quit()
        time.sleep(5)
        print ("Troll")