_UbUnTuBoX_
By: a guest | Nov 3rd, 2007 | Syntax:
Python | Size: 1.05 KB | Hits: 254 | Expires: Never
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