How can I edit text object properties with a script? I have got some files with a lot of text objects for descriptions. Now I need to modify all these text objects.

Example:

Modify the curve resolution-U, but also modify the font bevel extrude. I can modify the extrude using this. Also if possible change the text color as I might need to add or replace existing material. All this using Cycles.

I can modify some parameters:

for ob in bpy.data.objects:

    print ('ob =', ob.name, ' type =', ob.type)
    if ob.type == "FONT":
        qtyTEXT+=1

    tcu = ob.data
    print ( 'font name =',tcu.name )


    #  Curve attributes
    tcu.extrude = 0.2     # in BU
    tcu.bevel_depth = 0.1    # in BU
    tcu.bevel_resolution = 0


But this does not allow to change the curve text parameters like resolution!

Also, would be nice to be able to add a new cycles material for each of the text object.
import bpy

# Set render engine to cycles
bpy.context.scene.render.engine = 'CYCLES'

textObjs = [ o for o in bpy.data.objects if o.type == 'FONT' ]
print( "No of text objs: %s" % len( textObjs ) )

for o in textObjs:
    print( o.name )

    # Set text properties
    o.data.extrude             = 0.2
    o.data.bevel_depth         = 0.1
    o.data.bevel_resolution    = 0.1
    o.data.resolution_u        = 12
    o.data.render_resolution_u = 12

    # Create a new material based on the object's name
    o.active_material = bpy.data.materials.new(o.name + '.mat')
    o.active_material.use_nodes = True