def filePathDelta(origin, destination):
 commonItems = 0
 path1 = origin.path.split(os.sep)
 path2 = destination.path.split(os.sep)
 for (elem1, elem2) in zip(path1, path2):
  if (elem1 == elem2):
   commonItems += 1
  else:
   break
 path = (['..'] * (len(path1) - commonItems))
 return (path + path2[commonItems:])

def filePathDelta ( origin , destination ) : commonItems = 0 path1 = origin . path . split ( os . sep ) path2 = destination . path . split ( os . sep ) for ( elem1 , elem2 ) in zip ( path1 , path2 ) : if ( elem1 == elem2 ) : commonItems += 1 else : break path = ( [ '..' ] * ( len ( path1 ) - commonItems ) ) return ( path + path2 [ commonItems : ] )
return a list of strings that represent c{destination} as a path relative to c{origin} .