Advertisement
Guest User

_UbUnTuBoX_

a guest
Nov 3rd, 2007
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.05 KB | None | 0 0
  1. import gnomevfs
  2. import gobject
  3.     vol_monitor = gnomevfs.VolumeMonitor()
  4.     volume = gnomevfs.Volume()
  5.     for volume in vol_monitor.get_mounted_volumes():
  6.         ft = volume.is_user_visible()
  7.         if ft == True:
  8.             if volume.get_filesystem_type() == 'cdda':
  9.                 fst = 'Media cd'
  10.             elif volume.get_filesystem_type() == 'cdrom':
  11.                 fst = 'Media cd'
  12.             elif volume.get_filesystem_type() == 'cd9660':
  13.                 fst = 'Media cd'
  14.             elif volume.get_filesystem_type() == 'iso9660':
  15.                 fst = 'Media cd'
  16.             elif volume.get_filesystem_type() == 'hsfs':
  17.                 fst = 'Media cd'
  18.             elif volume.get_filesystem_type() == 'udf':
  19.                 fst = 'Media cd'
  20.             else:
  21.                 fst = volume.get_filesystem_type()
  22.             path = volume.get_device_path()
  23.             dn = volume.get_display_name()
  24.             print 'Il drive ' + dn
  25.             print '     ha un filesystem: ' + fst
  26.             print '     e ha come percorso: ' + path
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement