Setting handles to vec -problem

Could use some help from Blender-python gurus.

I’am started to work with a SVG-import script.

Here is my test code.


...

bt1 = BezTriple.New(0.0,0.0,0.0, -2.0,-2.0,0.0, 0.0,0.0,0.0)
bt2 = BezTriple.New(0.0,0.0,0.0, -2.0,2.0,0.0, 0.0,0.0,0.0)
bt3 = BezTriple.New(0.0,0.0,0.0, 2.0,2.0,0.0, 0.0,0.0,0.0)
bt4 = BezTriple.New(0.0,0.0,0.0, 2.0,-2.0,0.0, 0.0,0.0,0.0)


#first point
cu = c.appendNurb(bt1)

cu.append(bt2)  
cu.append(bt3) 
cu.append(bt4)

# set handles to vector
cu[0].handleTypes = (BezTriple.HandleTypes.VECT,BezTriple.HandleTypes.VECT)
cu[1].handleTypes = (BezTriple.HandleTypes.VECT,BezTriple.HandleTypes.VECT) 
cu[2].handleTypes = (BezTriple.HandleTypes.VECT,BezTriple.HandleTypes.VECT)
cu[3].handleTypes = (BezTriple.HandleTypes.VECT,BezTriple.HandleTypes.VECT)


#cyclic
cu.setFlagU(1)

c.update

Blender.Redraw()

This results this:
http://www.opendimension.org/blender3d/images/pycurve1.jpg

The handles are in 0.0.0. like they were set. But when I go to edit mode and move one point, this happens:

http://www.opendimension.org/blender3d/images/pycurve2.jpg

Handles are updated and they points to the previous points nicely as they should be. So this is the result I want.

Am I doing something wrong here? Or should I set the handles manually?

Any help would be appreciated!

I’m using cvs-blender on Linux with Python 2.4