Set materials and rotate text

So here is my code: supposed to put some text to a scene, render it, move on to the next string. It works w/ a buffer background picture, a merge of sort.
The problem is: 1) I can’t set the rotation and 2) I can’t assign a material to the text…
I tried setRot(…) setRotation() setMat setMaterials() to no avail.
I have looked high and low. But not at the right place obviously.

Concrete help very much appreciated.
The code is here:

import Blender
from Blender import *
from Blender.Scene import Render
from Blender import Curve, Object, Scene, Text3d, Material

# what doesn't work: setting the materials and setting the rotation.
# initialize the onctext....
Blender.Window.EditMode(0)

scn = Scene.GetCurrent()
context = scn.getRenderingContext()
context.setRenderPath("C:/temp/pwd")

mytexte = Text3d.New("nomDemyText")  # create a new Text3d object called MyText
myobjettext = Object.New('Text')     # make TEXT object
myobjettext.link(mytexte)           # link TEXT data with this object
scn.link(myobjettext)                # link object into scene
myobjettext.makeDisplayList()        # rebuild the display list for this object
Window.RedrawAll()

# _______________ initialize counter ______________________________
dacntr=1

myTexteListe=["Test
test","Test2
test2"]

# _______________ initialize counter, and BSA results ______________________________
myobjettext.setLocation(4.437, -14.340, 3.861) 
#myobjettext.setRot(-0.069, 0, 0) 
#print(myobjettext.getRot())


mytexte.setAlignment(Text3d.MIDDLE)
mytexte.setBevelAmount(0)
mytexte.setExtrudeDepth(0.05) #the depth of the text
mytexte.setExtrudeBevelDepth(0)

mat = Material.Get('gold')          # create a new Material called 'newMat'
#mytext.setMaterials(mat)

context.setImageType(Render.TARGA)

for x in myTexteListe:
    mytexte.setText(x)
    CRposition_in_X=x.find("
")+1
    d_file=x[CRposition_in_X:] #slicing of the string
    d_file = d_file.replace(" ", "_")+str(dacntr)+".tga"
    print d_file
    context.render()
    context.saveRenderedImage(d_file)
    dacntr+=1

Hi

1/
it’s not setRotation it’s setEuler - you have to check whether
this takes Radians or Degrees

2/a

Get the curve with the same name as your Text3d
Blender.Curve.Get(“nomdetext”)

This has a Get method for Materials but no set.
Write to LetterRip asking for the Set method to be

added

2b/ Hack while u are waiting for this to happen

Create a mesh duplicate by using Mesh.getFromObject
apparently this will get a mesh even from a curve

Set the Materials List for this object

Thanks mcbuse. Very good suggestions. WHen it works and is refined enough, I’ll post it again: I think it has a legitimate use (here, I was creating awards for 30 kids, and merging the text and re-render was daunting, so that pushed me to learn python, and python in Blender, a good thing).