Wxpython Notebook Panel Hangs When Threads Are Running
I am trying to develop a gui using wxpython that has 3-4 notebook panels and one of these panels (master panel) calls another python script called abc.py. In this abc.py i am runni
Solution 1:
You will also need to wrap the call to abc.py
(with popen
, I suppose) into a thread, otherwise the GUI will block. When the process in the external script is collecting its answer, you have to get it back in a thread-safe way (important!) to wxPython
.
A better way would be to import from abc.py
, if that is possible and spin the imported objects in the long running thread.
For an explanation how to communicate back thread-safe see the wxPython wiki. I personally find the last example the easiest to understand and implement.
Post a Comment for "Wxpython Notebook Panel Hangs When Threads Are Running"