title: Exit button doesn´t work - wxpython
body: <p>I developed a GUI with wxGlade and its still working. But to start the GUI - I coded a script with some choices.
  So everything works but when I push the red button with the "x" to close the window - the application doesn´t stop. </p>
  
  <p>I made a method, called by a separate exit button, which calls an exit-function in my script. But normally the users are using the close button (red button with X) so my method is not being used to close the window and the window doesn't get closed ultimately.</p>
  
  <p>This is the exit-function. </p>
  
  <pre><code>def stopExport(self, event):                      # wxGlade: MyFrame.&lt;event_handler&gt;
      self.Close()  # close the Frame
      from ExportManager import Exportmanager       # import the exit function
      Exportmanager().exit()                        # call it
  </code></pre>
  
  <p>How can I use this function with the red button with the "<code>x</code>"?</p>