So, I'm depeloping a Python/GTK app which, after showing an assistant, it hides the assistant's window and runs an external app. The problem is that window.hide() doesn't works if, after the command, there's an app call using os.system() or call(). When the call is done, the window seems to hang and it doesn't disappears until all the calls are done. So... what can be done?
|
|
|||||||||||||||||
|
|
In my applications I tend to replace |
|||||
|
|
After some time googling possible solutions, I've found this simple answer, which waits to GTK until it finished all its working tasks. You may think that makes the app slower, but the difference is almost unexistent. This workaround can be used with any version of Python. It works with PyGTK and with GTK+3 (with GTK+3, change
Just add this before the code which causes the problem... and done! :) |
||||
|
|