def add_type(self, type_name): type_id = wx.NewId() self.id_to_type[type_id] = type_name self.menu.Append(type_id, type_name)