def proplist(root, fn):
 result = []
 for path in propfiles(root, fn):
  try:
   f = open(path)
  except IOError:
   continue
  while True:
   line = f.readline()
   if line.startswith('END'):
    break
   assert line.startswith('K ')
   L = int(line.split()[1])
   key = f.read(L)
   result.append(key)
   f.readline()
   line = f.readline()
   assert line.startswith('V ')
   L = int(line.split()[1])
   value = f.read(L)
   f.readline()
  f.close()
 return result

def proplist ( root , fn ) : result = [ ] for path in propfiles ( root , fn ) : try : f = open ( path ) except IOError : continue while True : line = f . readline ( ) if line . startswith ( 'END' ) : break assert line . startswith ( 'K ' ) L = int ( line . split ( ) [ 1 ] ) key = f . read ( L ) result . append ( key ) f . readline ( ) line = f . readline ( ) assert line . startswith ( 'V ' ) L = int ( line . split ( ) [ 1 ] ) value = f . read ( L ) f . readline ( ) f . close ( ) return result
return a list of property names for file fn in directory root .