Running the Python program will display a CMD in the background, it is very simple to not display ( although I have been looking for 1 hours ...). To understand the basics )
Method 1:pythonw xxx.py
Method 2: Change the. py to. PYW (this is actually using the script resolver Pythonw.exe)
Original:
1)
Try changing the file extension to. pyw. Double-clicking A. Pyw would use Pythonw.exe instead of Python.exe.
Python.exe There's a console window when you run it. If your Python code has a GUI, running with Python.exe will run out of a black window if you use Phthonw.exe.
Compared with Python.exe, Pythonw.exe has the following differences: 1) do not eject the console window (also called DOS window) 2) all outputs to the original stdout and stderr are invalid 3) all reads from the original stdin will only be EOF.P The YW format is a purely graphical interface program designed to run the development process. Users of the Pure graphical interface program do not need to see the console window. It is worth mentioning that when developing a pure graphical interface program, you can temporarily change the. pyw to. py so that the runtime can bring up the console window and see all the error messages for easy removal. Note: Only the Windows version of Python has the. pyw format.
Original
Http://www.cnblogs.com/mmix2009/p/3536148.html
Resolve Python to run a pop-up cmd window on Windows (DOS window)