Question:
I have the following situation: I have a program written in python that works with Gtk + webkit + flask. To run such a program I must enter the CMD and type "python file.py" and it will start my GUI application normally. Where according to usage some debug messages are companies in the CMD terminal.
My question is as follows:
How to start my python application and "hide possible error return in CMD"?
Something like running the terminal in the background.
Answer:
Python on Windows has two executables. python.exe
and pythonw.exe
. The difference between them is that pythonw.exe
does not open a terminal window.
If you want to run the program by clicking on it, you can do it with Abrir com
or renaming the file to .pyw
.
From cmd
, use pythonw arquivo.py
.