Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement