Next, we need to declare whether the instance of wx.Frame needs to be shown anew or whether it is already in position or otherwise should be hidden. For this we use the method Show from wx.Frame.
We then tell Python to set the window as the top level window, using the SetTopWindow method from the wx.App class. If the function executes as expected, we then return a value of '1'.
frame.Show(True)
self.SetTopWindow(frame)
return 1
