code: def write_to_file(self, f):
          
          for section, values in self._values.iteritems():
              try:
                  section_name, subsection_name = section
              except ValueError:
                  (section_name, ) = section
                  subsection_name = None
              if subsection_name is None:
                  f.write("[%s]\n" % section_name)
              else:
                  f.write("[%s \"%s\"]\n" % (section_name, subsection_name))
              for key, value in values.iteritems():
                  f.write("%s = %s\n" % (key, _escape_value(value)))
docs: Write configuration to a file-like object.