      @staticmethod
      def format_help(helptext, is_section=False):
          """ Format comments for default ini file """
          logger.debug("Formatting help: (helptext: '%s', is_section: '%s')", helptext, is_section)
          helptext = '# {}'.format(helptext.replace("\n", "\n# "))
          if is_section:
              helptext = helptext.upper()
          else:
              helptext = "\n{}".format(helptext)
          logger.debug("formatted help: '%s'", helptext)
 
</s> remove         f_cfgfile = open(self.configfile, "w")
        self.config.write(f_cfgfile)
        f_cfgfile.close()
 </s> add         with open(self.configfile, "w") as f_cfgfile:
            self.config.write(f_cfgfile) </s> remove             helptext += "\nThis option can be updated for existing models."
 </s> add             helptext += "\nThis option can be updated for existing models.\n"
        if datatype == list:
            helptext += ("\nIf selecting multiple options then each option should be separated "
                         "by a space or a comma (e.g. item1, item2, item3)\n")
        formatted = ""
        for hlp in helptext.split("\n"):
            subsequent_indent = "\t\t" if hlp.startswith("\t") else ""
            hlp = f"\t- {hlp[1:].strip()}" if hlp.startswith("\t") else hlp
            formatted += textwrap.fill(hlp,
                                       100,
                                       tabsize=4,
                                       subsequent_indent=subsequent_indent) + "\n"
        helptext = '# {}'.format(formatted[:-1].replace("\n", "\n# "))  # Strip last newline
      @staticmethod
      def format_help(helptext, is_section=False):
          """ Format comments for default ini file """
          logger.debug("Formatting help: (helptext: '%s', is_section: '%s')", helptext, is_section)
        formatted = ""
        for hlp in helptext.split("\n"):
            subsequent_indent = "\t\t" if hlp.startswith("\t") else ""
            hlp = f"\t- {hlp[1:].strip()}" if hlp.startswith("\t") else hlp
            formatted += textwrap.fill(hlp,
                                       100,
                                       tabsize=4,
                                       subsequent_indent=subsequent_indent) + "\n"
        helptext = '# {}'.format(formatted[:-1].replace("\n", "\n# "))  # Strip last newline
          if is_section:
              helptext = helptext.upper()
          else:
              helptext = "\n{}".format(helptext)
          logger.debug("formatted help: '%s'", helptext)
keep keep keep keep replace keep keep keep keep keep
 scripts.train - Add freeze weights option
lib.config:
  - Better formatting for .ini files
  - Support multi-select options
gui - Add support for multi-select config items 
lib/config.py