def OnMacroListSave(self, event):
        """Macro list save event handler"""

        # 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()
def OnMacroListSave ( self , event ) : 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 macros = self . main_window . grid . code_array . macros self . main_window . actions . save_macros ( filepath , macros ) event . Skip ( )
Macro list save event handler