import Blender

print '\n*** Curve Test ***\n'

list = Blender.Curve.Get()

print list

cur = Blender.Curve.Get('Curve')

print '\n** get*() calls '
for prop in ["Name","PathLen","Totcol","Flag","Bevresol","Resolu","Resolv","Width","Ext1","Ext2","Loc","Rot","Size"]:
    value =  eval("cur.get%s()"%prop)
    print prop,"-->",value
    exec("cur.set%s(value)"%prop)


print '\n** attributes'
#print cur.name
#print eval( "cur.%s" % 'name')
#cur.name = 'Curve'
exec( "cur.name='Curve'")
for attr in [ "name","pathlen","totcol","flag","bevresol","resolu","resolv","width","ext1","ext2","loc","rot","size"]:
    print 'attribute is',attr
    value = eval("cur.%s"%attr)
    print 'value is', value
    try:
        exec("cur.%s = value"%attr)
    except Exception, e:
        print '** cannot set attribute', attr, e
