How Can I Combine Tkinter And Wxpython Without Freezing Window - Python?
Solution 1:
You cannot combine tkinter and wxPython. They are both GUI toolkits with their own event loops, which are basically infinite loops processing events from widgets. You cannot run two infinite loops at once.
However, there is probably also no reason to run both at once. If you need a widget which is not present in tkinter, just build your whole application with wxPython.
Solution 2:
It's possible to combine Tkinter with wxPython as an independent module, for instance to use its advanced printing features. Try a line like this:
os.popen('PP4\wxprint_2.py "{}"'.format(fname)) # OK!
(wxprint_2.py is my wxPython standalone printing module)
The only problem is that on my PC, the printing module may bomb out at start-up without any warning or clue, probably because the memory limit is exceeded.
Post a Comment for "How Can I Combine Tkinter And Wxpython Without Freezing Window - Python?"