def GetMountpoints ( ) : devices = { } for filesys in GetFileSystems ( ) : devices [ filesys . f_mntonname ] = ( filesys . f_mntfromname , filesys . f_fstypename ) return devices
get names of all disk drive python
List all the filesystems mounted on the system .
def GetMountpoints():
  """List all the filesystems mounted on the system."""
  devices = {}

  for filesys in GetFileSystems():
    devices[filesys.f_mntonname] = (filesys.f_mntfromname, filesys.f_fstypename)

  return devices