The important part is that we placed the entire wxPython code into its own function, which we named def wxPythonApp().
In the callback function for the button click-event, we simply call this code.
One thing to note is that we have to close the wxPython GUI before we can continue using the tkinter GUI.