def OnMacroListLoad(self, event):
        """Macro list load event handler"""

        # Get filepath from user

        wildcards = get_filetypes2wildcards(["py", "all"]).values()

        wildcard = "|".join(wildcards)

        message = _("Choose macro file.")

        style = wx.OPEN
        filepath, filterindex = \
            self.interfaces.get_filepath_findex_from_user(wildcard, message,
                                                          style)

        if filepath is None:
            return

        # Enter safe mode because macro file could be harmful

        post_command_event(self.main_window, self.main_window.SafeModeEntryMsg)

        # Load macros from file

        self.main_window.actions.open_macros(filepath)

        event.Skip()
def OnMacroListLoad ( self , event ) : wildcards = get_filetypes2wildcards ( [ "py" , "all" ] ) . values ( ) wildcard = "|" . join ( wildcards ) message = _ ( "Choose macro file." ) style = wx . OPEN filepath , filterindex = self . interfaces . get_filepath_findex_from_user ( wildcard , message , style ) if filepath is None : return post_command_event ( self . main_window , self . main_window . SafeModeEntryMsg ) self . main_window . actions . open_macros ( filepath ) event . Skip ( )
Macro list load event handler