[Tutor] Reading the CDROM in Linux
Steven D'Aprano
steve at pearwood.info
Sat Nov 6 02:31:54 CET 2010
Steven D'Aprano wrote:
> But if you might have an external hard drive plugged in, or a USB key,
> or similar, then you need to find out what the volume name of the
> mounted CD drive is. That's a good question and I don't have an answer
> right now. Let me think about it and get back to you.
Well that was easy. You need to query the external tool volname, which
should be present on just about any Linux system.
Use the subprocess module to call "volname /dev/cdrom".
--
Steven
More information about the Tutor
mailing list