def disk_partitions(all=False):
 retlist = []
 partitions = cext.disk_partitions()
 for partition in partitions:
  (device, mountpoint, fstype, opts) = partition
  ntuple = _common.sdiskpart(device, mountpoint, fstype, opts)
  retlist.append(ntuple)
 return retlist

def disk_partitions ( all = False ) : retlist = [ ] partitions = cext . disk_partitions ( ) for partition in partitions : ( device , mountpoint , fstype , opts ) = partition ntuple = _common . sdiskpart ( device , mountpoint , fstype , opts ) retlist . append ( ntuple ) return retlist
return mounted partitions as a list of namedtuple .