[Python] Fix default arguments for Solution.write_chemkin

Also, add quiet option to suppress output
This commit is contained in:
Ingmar Schoegl 2023-09-05 09:51:21 -05:00
parent 363fe2cf73
commit f15a34d0f2

View File

@ -334,7 +334,8 @@ cdef class _SolutionBase:
Y.to_file(str(filename))
def write_chemkin(self, mechanism_path=None, thermo_path=None, transport_path=None,
sort_species=False, sort_elements=False, overwrite=False):
sort_species=None, sort_elements=None, overwrite=False,
quiet=False):
"""
Write this `~cantera.Solution` instance to one or more Chemkin-format files.
See the documentation for `cantera.yaml2ck.convert` for information about the
@ -351,7 +352,8 @@ cdef class _SolutionBase:
sort_elements=sort_elements,
overwrite=overwrite,
)
print(f"Wrote: {output_paths}")
if not quiet:
print(f"Wrote: {output_paths}")
def __getitem__(self, selection):
copy = self.__class__(origin=self)