Trying to embed our tkinter GUI code into wxPython

In this recipe, we will go in the opposite direction to the previous recipe and try to call our tkinter GUI code from within a wxPython GUI.

Getting ready

We will reuse some of the wxPython GUI code we created in a previous recipe in this chapter.

How to do it...

We will start from a simple wxPython GUI, which looks like this:

How to do it...

Next, we will try to invoke a simple tkinter GUI.

This is the entire code to do this in a simple, non-OOP way:

#============================================================= def tkinterApp(): import tkinter as tk from tkinter import ttk win = tk.Tk() win.title("Python GUI") aLabel ...

Get Python GUI Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.