GEMScienceTools / oq-mbtk

OpenQuake Model Building Toolkit, a suite of tools for building components and analysing models for PSHA.
https://gemsciencetools.github.io/oq-mbtk/index.html
GNU Affero General Public License v3.0
16 stars 8 forks source link

Handle Windows pathnames in TOML files #234

Closed pslh closed 2 years ago

pslh commented 2 years ago

Using the simple file.write approach to write .toml files containing Windows pathnames results in files that are no longer valid TOML.

By using toml.load to load TOML into a Python dictionary and toml.dump(dict, file) to write dictionaries in TOML format, we ensure that files are encoded correctly.