          logger.debug("Saving config: (command: '%s')", command)
          cfgfile = FileHandler("save", "config").retfile
          if not cfgfile:
              return
          cfg = self.cli_opts.get_option_values(command)
          cfgfile.write(self.serializer.marshal(cfg))
          cfgfile.close()
          self.add_to_recent(cfgfile.name, command)
          logger.debug("Saved config: (command: '%s', cfgfile: '%s')", command, cfgfile)
  
      def add_to_recent(self, filename, command):
 
</s> remove         self.add_to_recent(cfgfile.name, command)
        logger.debug("Saved config: (command: '%s', cfgfile: '%s')", command, cfgfile)
 </s> add         cfg = self.cli_opts.get_option_values(command)
        self.serializer.save(filename, cfg)
        self.add_to_recent(filename, command)
        logger.debug("Saved config: (command: '%s', filename: '%s')", command, filename) </s> remove         self.add_to_recent(cfgfile.name, command)
        logger.debug("Loaded config: (command: '%s', cfgfile: '%s')", command, cfgfile)
 </s> add         self.add_to_recent(filename, command)
        logger.debug("Loaded config: (command: '%s', filename: '%s')", command, filename) </s> remove             cfg = self.serializer.unmarshal(cfgfile.read())
 </s> add             filename = cfgfile.name
            cfgfile.close()
            cfg = self.serializer.load(filename) </s> remove             with open(filename, "r") as cfgfile:
                cfg = self.serializer.unmarshal(cfgfile.read())
 </s> add             cfg = self.serializer.load(filename) </s> remove             logger.debug("Serializer set from file extension: '%s'", extension)
            retval = Serializer.get_serializer_from_ext(extension)
 </s> add             logger.debug("Serializer set from filename extension: '%s'", extension)
            retval = get_serializer_from_filename(filename)
        filename = cfgfile.name
          logger.debug("Saving config: (command: '%s')", command)
          cfgfile = FileHandler("save", "config").retfile
          if not cfgfile:
              return
        filename = cfgfile.name
        filename = cfgfile.name
          cfgfile.close()
          self.add_to_recent(cfgfile.name, command)
          logger.debug("Saved config: (command: '%s', cfgfile: '%s')", command, cfgfile)
  
      def add_to_recent(self, filename, command):
keep keep keep keep replace replace keep keep keep keep keep
 Standardize serialization (#903)

* Standardize serialization

- Linting
- Standardize serializer use throughout code
- Extend serializer to load and save files
- Always load and save in utf-8
- Create documentation 
lib/gui/utils.py