I have a script with a wx.Python GUI that monitors game files for changes and then makes a .tar.gz backup of each turn. If I run the test script (.py extension) the program works well and I can play the game without noticing the python script running in the background. When the script is run a console window is opened at the same time because of the .py extension.
So I tried to package the script as an exe using Py2Exe so I can share it, and while the script runs properly and does its job, every time it makes the .tar.gz and updates a text control in the GUI, the game minimises and the focus is given to the GUI. I don't want this to happen as it is very disjointed trying to play the game. The game should stay open all the time and the GUI should just update itself quietly in the background as it makes its archives.
Then I tried changing the .py extension to a .pyw extension to not open the console window. Once again, the program does what it is supposed to as far as backing up the changes, but this also minimises the game every time it creates an archive and gives focus to the GUI.
My questions are:
1. By appending content to a text control, does this demand the window focus if there isn't a console running?
2. Is there a way for me to run the application and not have it focus on itself when it does something?
3. Why does it remain hidden when the console window is open (.py files) but demand the focus as a .exe or .pyw?
I really hope someone can help me with this problem as I am now in the home stretch as far as completing this project and this seems to be the last of my problems.