how to set material flags by in python script????

Hello

dont anybody know how to chose material flags in python scripting??
I tried this, but unsuccessfully

mat = Material.New()

mat.setMode(‘shadowless’, ‘texface’)
…and this one also doesn’t work

mat.mode |= (SHADOWLESS+TEXFACE)

…please have you any expirience with it? Dont anybody know any working (!) blender scripting manual?

Thank you all which helps me to be better “blenderist”
Jiri

this is from the new documentation:

mat.mode |= Material.Modes.ZTRANSP

full text is here
http://www.blender.org/modules/documentation/228PythonDoc/Material-module.html
hope this helps [!]
what means (Type: readonly dictionary) at the bottom of the page, if there’s an example to modify the modes?

Doesn’t know about ‘shadowless’ /me knows of ‘shadeless’

Stefano

oh that’s nice. Thank you. Finally nice, more entire blender object description.

Jiri