yeah, we do our mental ray rendering as a Maya batch script that calls a python script. we set everything up then call cmds.Mayatomr(). i've not tried it as a standard python script using mayapy -- we use Maya batch for legacy reasons -- but i see no reason why it would not work the same.... well, as long as you're using pymel. pymel ensures that all the proper mel scripts are sourced so that mayapy works the same as Maya batch.
-chad -- http://groups.google.com/group/python_inside_maya
