On Wed, Aug 20, 2003 at 06:38:41PM +0200, Dirk Meyer wrote: > Aubin Paul wrote: > > As I was looking through rom_drives, I wonder why we're avoiding > > importing CDROM.py; > > Because I wrote the stuff and I didn't know about that file ;-) > > > it would make things less Linux-specific, and since CDROM.py is > > included with Python, it's a non-issue to do things using it. > > Agreed. > > > Also, there is an IOCTL for eject, so why don't we use that instead > > of calling 'eject' > > I thought about that, too some days ago.
It's pretty straightforward too: import os from CDROM import * from fcntl import ioctl fd = os.open('/dev/cdrom', os.O_RDONLY | os.O_NONBLOCK) s = ioctl(fd, CDROMEJECT) s = ioctl(fd, CDROMCLOSETRAY) Aubin ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel