How do I suppress dialog in a python script

I think you need to set up an exporter:-
Look here at the exporter property.