using PathLen() method

for finding the length of a path, i am trying to use the ‘getPathLen’ method of the ‘Curve Data’ class. i was trying

import Blender
from Blender import Curve
cur = getCurveLen('Curve1')
print cur

Curve1 is the name of the curve i want to find the length of.
can anyone tell me why this isnt working?
(the print part is just for me to see the length)
is the url for this method in the Blender API documentation, in case you want to see it

thanks for your help, plz dont laff at my lack of python knowledge

Seems like there’s a few problems here…
The function name on the API documentation is getPathlen() but you’ve written getCurveLen()…

…However it seems there is a typo in the documentation as the correct method name is getPathLen()

This works:

import Blender
from Blender import Object

cur = Object.Get('Curve')
curdata = cur.getData()
print dir(curdata)              #  Which tells us that Pathlen should be PathLen
l = curdata.getPathLen()
print l                              #  Success!

thanks for your help
now it is working, but it is returning a value of 100 for every curve. any ideas why this isnt working properly?