code: def OnMacroListSave(self, event):
          
  
          # Get filepath from user
  
          wildcards = get_filetypes2wildcards(["py", "all"]).values()
  
          wildcard = "|".join(wildcards)
  
          message = _("Choose macro file.")
  
          style = wx.SAVE
          filepath, filterindex = \
              self.interfaces.get_filepath_findex_from_user(wildcard, message,
                                                            style)
  
          if filepath is None:
              return
  
          # Save macros to file
  
          macros = self.main_window.grid.code_array.macros
          self.main_window.actions.save_macros(filepath, macros)
  
          event.Skip()
docs: Macro list save event handler