how to access the output module settings in script

I don't know how to access the output module settings in script without creating a template manually.
Example:
If I want to get JPEG Sequence settings to be set in Output module. How to do it in code...
Many examples have shown to use outputModule.applyTemplate("JPEG Sequence");
but I have to create template manually. Is there any other code get settings without doing it manually. Thanks for your time!
