bezier spline change API ?

how can this be corrected with latest API ?


 
import bpy
from bpy.props import *
from mathutils import *
from math import *
 
 
 
 
def getPoints(Curve):
#    print("
getting points for ", C1.name," by array")
    Curve_length = len(Curve.splines[0].bezier_points)
    print("Curve_length = ", Curve_length)
 
    Curve_array = array.array('f', [0,1,2] * Curve_length)
    print ("Curve_array = ", Curve_array)
 
    Curve_points = Curve.splines[0].bezier_points
    print("Curve_points = ", Curve_points)
 
    Curve_point0 = Curve_points[0].co
    print("Curve_point0 = ", Curve_point0)
 
    Curve_points.foreach_get('co', Curve_array)
    print("Curve_array = ", Curve_array, "

")
 
    return Curve_array
 
getPoints('Curve')
 
 
 
 
 

got error on line for spline?
File “splinemulti
1.blend/splimenulti1.py”, line 14, in getPoints
AttributeError: ‘str’ object has no attribute ‘splines’

Curve_length = len(Curve.splines[0].bezier_points)

Thanks and happy 2.5