#NEWLINE# def calculate_cubic_bezier_length( px , py ) : #NEWLINE# #INDENT# '\n    Return the length of a cubic bezier\n    ' #NEWLINE# length = 0.0 #NEWLINE# prev = Point ( px [ 0 ] , py [ 0 ] ) #NEWLINE# for i in range ( 1 , len ( px ) ) : #NEWLINE# #INDENT# length += sqrt ( ( ( ( px [ i ] - prev . x ) ** 2 ) + ( ( px [ i ] - prev . y ) ** 2 ) ) ) #NEWLINE# prev = Point ( px [ i ] , py [ i ] ) #NEWLINE# #UNINDENT# return length