2

I have no idea if this problem has the solution I want but here goes. I'm making a PyQt4 program that apparently needs the console window to run properly. However, whenever I activate another window, sending the program I'm working on to the back, the only way I can get back to it is by closing all the windows in front of said window. I can't just click on the taskbar because the only thing that comes back is the console window. I'm curious. Is there a way to have the GUI window activate along with, or independent of, the console window without having to go through the annoying process of closing (minimizing) potentially all the rest of your windows?

Edit: I just realized my question is pretty vague. Let me elaborate.

I'm compiling said program using pyinstaller.

enter image description here

The reason it needs the console window to work properly (I have tried using the .pyw file as well, to no avail) is because there's another program that's the core of this one that prints out to it in a way I can only describe as violently. Apparently it won't be happy unless it has the console to record it's outbursts.

That being said, I need the console window. However, as I mentioned before, that is the only thing that comes up when the pyinstaller icon is clicked.

enter image description here

There is a gui attached to the console, but there's no way to get it back even after the user would minimize it because the pyinstaller icon insists it doesn't exist.

Maybe it has something to do with how I defined the window while programming it, but I don't see why that would be the case. Is there something in particular pyinstaller doesn't like that would make it act like this?

Korbaine
  • 49
  • 4
  • Possible duplicate of [How to make a PyQT4 window jump to the front?](http://stackoverflow.com/questions/12118939/how-to-make-a-pyqt4-window-jump-to-the-front) – GLaDOS Feb 24 '16 at 16:42
  • What do you mean by: "apparently needs the console window to run properly"? It looks like *that* is the real problem, and the other issues are just a side-effect of it. – ekhumoro Feb 24 '16 at 19:46

1 Answers1

1

How are you launching the PyQt application?

If you're launching it with the python executable, it will create a console.

python my_application.py

Instead, launch it with the GUI version of python -- pythonw:

pythonw my_application.py

If the python path isn't in the system path, you may need to specify the whole path to the executable:

C:\python27\pythonw.exe C:\path\to\my_application.py
Brendan Abel
  • 35,343
  • 14
  • 88
  • 118