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.
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.