model python

is there a way to export a model with colour materials to a pythonscript?