Posted by _UbUnTuBoX_ on Sat 3 Nov 12:48
report abuse | download | new post
- import gnomevfs
- import gobject
- vol_monitor = gnomevfs.VolumeMonitor()
- volume = gnomevfs.Volume()
- for volume in vol_monitor.get_mounted_volumes():
- ft = volume.is_user_visible()
- if ft == True:
- if volume.get_filesystem_type() == 'cdda':
- fst = 'Media cd'
- elif volume.get_filesystem_type() == 'cdrom':
- fst = 'Media cd'
- elif volume.get_filesystem_type() == 'cd9660':
- fst = 'Media cd'
- elif volume.get_filesystem_type() == 'iso9660':
- fst = 'Media cd'
- elif volume.get_filesystem_type() == 'hsfs':
- fst = 'Media cd'
- elif volume.get_filesystem_type() == 'udf':
- fst = 'Media cd'
- else:
- fst = volume.get_filesystem_type()
- path = volume.get_device_path()
- dn = volume.get_display_name()
- print 'Il drive ' + dn
- print ' ha un filesystem: ' + fst
- print ' e ha come percorso: ' + path
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.