Opening a file in O_NONBLOCK mode

Ben Gertzfield che at debian.org
Thu May 11 22:06:18 EDT 2000


Hi, Pythoners!

I'm trying to track down a bug a user reported on the CDDB.py python
module; part of the module accesses the CD-ROM device via an
OS-specific C extension to read the track listing off an audio CD.

It turns out that the Linux kernel (of course) wants programs that
read audio tracks to open the CD-ROM device in O_RDONLY and O_NONBLOCK
mode. But Python's open() function only allows me to specify
read-only; how can I specify O_NONBLOCK? 

Do I have to do all the file opening inside the C module? (I was
hoping that I wouldn't have to.)

Ben

-- 
Brought to you by the letters M and F and the number 12.
"A squib is a firecracker."
Debian GNU/Linux maintainer of Gimp and GTK+ -- http://www.debian.org/



More information about the Python-list mailing list