Re: Help controlling CDROM from python

2007-03-23 Thread R. Bernstein
If you want an OS neutral way one may be able to use pycdio from the Cheese shop. It requires libcdio to be installed and that sometimes the case if you have a free media player (like vlc or xine, or mplayer) installed. I don't really use it all that often so I can't vouch for how good it is. (Al

Re: Help controlling CDROM from python

2007-03-10 Thread MonkeeSage
On Mar 10, 4:11 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote: > win32file.CreateFile(r'\\.\\' + drive, GENERIC_READ, > FILE_SHARE_READ, > None, OPEN_EXISTING, 0, 0) Oops! That should have been: h = win32file.CreateFile(r'\\.\\' + drive, GENERIC_READ,

Re: Help controlling CDROM from python

2007-03-10 Thread MonkeeSage
On Mar 10, 8:27 am, Ognjen Bezanov <[EMAIL PROTECTED]> wrote: > My issue is that I need to be able to eject the CDROM tray even if there > is no disk inside. Here's a Q&D version (haven't tested the windows part, it's from an old mailing list post, but it looks correct): import os, sys if 'win'