def _append_menu_item(self, menu, wx_id, title, fxn): if wx_id is None: wx_id = wx.NewId() menu.Append(wx_id, title) wx.EVT_MENU(menu, wx_id, fxn) return wx_id