docs: def node_to_ini(node, output=sys.stdout):
      """
      Convert a Node object with the right structure into a .ini file.
  
      :params node: a Node object
      :params output: a file-like object opened in write mode
      """
      for subnode in node:
          output.write(u'\n[%s]\n' % subnode.tag)
          for name, value in sorted(subnode.attrib.items()):
              output.write(u'%s=%s\n' % (name, value))
      output.flush()