code: def post_command_event(target, msg_cls, **kwargs):
      
  
      msg = msg_cls(id=-1, **kwargs)
      wx.PostEvent(target, msg)
docs: Posts command event to main window
  
      Command events propagate.
  
      Parameters
      ----------
       * msg_cls: class
      \tMessage class from new_command_event()
       * kwargs: dict
      \tMessage arguments