A write()
method can be used to write the reconstructed file contents
with the new settings, options, and potentially sections. This write method
is available in the file object that is returned by the add_file()
method of the ConfigParser
or the set()
method of an option
object.
file) |
write()
method. Otherwise it is expected that
file is a file name string and the file will be opened and
written to.
The two previous sections show example uses of this method.