def print_drive_class(msg, bitmask, any_capability): """ run and show output of cdio.get_devices_with_cap() """ drives = cdio.get_devices_with_cap(bitmask, any_capability) print("%s..." % msg) for d in drives: print("Drive %s" % d) print("-----")
def _getAllDevicePathsPyCdio(): import pycdio import cdio # using FS_AUDIO here only makes it list the drive when an audio cd # is inserted # ticket 102: this cdio call returns a list of str, or a single str return _listify(cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False))
def get_drives(): try: return cdio.get_devices_with_cap(pycdio.FS_MATCH_ALL, False) except IOError: log.critical("Problem finding any optical drives.") sys.exit(1)