[Qiangning Hong]
| How can my program find out the type of disc in my CD-RW | drive? I want | my program behaves differently depend on the type: if it is a normal | CD-ROM, read data from it; if a recordable CD, burn data onto it.
If you're on Windows, I think WMI can do it. Check out the Win32_CDROMDrive class and its Capabilities attribute.
Thanks for your answer.
I installed the wmi module and use the following code to generate Win32_CDROMDrive's Capabilities:
>>> import wmi >>> c = wmi.WMI() >>> cds = c.CDROMDrive() >>> cds [<wmi._wmi_object instance at 0x00EDC508>] >>> cds[0].Capabilities (3, 7)
I have only one CD-RW drive with an empty CD-R disc inserted. It is expected that the capability "4" (write access) should be in cds[0].Capabilities. However it isn't there.
_______________________________________________ Python-win32 mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-win32