Monday, 2 January 2012

Controlling the CD/DVD drive in python

This program requires pygame to be installed

import pygame.cdrom as cdrom
cdrom.init()
cd = cdrom.CD(0) # 0 = first cdrom device
cd.init()
cd.eject()
cd.quit()
cdrom.quit()

No comments:

Post a Comment