def getPathLength(path):
 pathLength = 0.0
 for pointIndex in xrange((len(path) - 1)):
  firstPoint = path[pointIndex]
  secondPoint = path[(pointIndex + 1)]
  pathLength += abs((firstPoint - secondPoint))
 return pathLength

def getPathLength ( path ) : pathLength = 0.0 for pointIndex in xrange ( ( len ( path ) - 1 ) ) : firstPoint = path [ pointIndex ] secondPoint = path [ ( pointIndex + 1 ) ] pathLength += abs ( ( firstPoint - secondPoint ) ) return pathLength
get the length of a path .