“cmd.save” writes content to a file.
cmd.save(string file, string selection, int state, string format)
def save(filename, selection='(all)', state=-1, format='', ref='', ref_state=-1, quiet=1, partial=0):
save | api