def path_split_all(path):
 parts = []
 while True:
  (path, fn) = os.path.split(path)
  if (len(fn) == 0):
   break
  parts.append(fn)
 return reversed(parts)

def path_split_all ( path ) : parts = [ ] while True : ( path , fn ) = os . path . split ( path ) if ( len ( fn ) == 0 ) : break parts . append ( fn ) return reversed ( parts )
split a path at all path separaters .