Solve the Problem of running the cmd window (dos window) on windows)
When running the python program, a cmd will be displayed in the background. It is very easy (although I have been searching for 1 hour... method 1: pythonw xxx. py Method 2. change py. pyw (this example uses the script program pythonw.exe) Original: 1) Try changing the file extension. pyw. double-clicking. pyw will use pythonw.exe instead of python.exe. then there is no comparison with python.exe, and pythonw.exe has the following differences: 1) the console window (also called the DOS window) is not displayed during execution. 2) all requests to the original stdout and stde The rr output is invalid. 3) All reads from the original stdin will only get the EOF. pyw format, which is designed to run the Developed Graphic Interface Program. Users of graphic interfaces do not need to see the console window. It is worth mentioning that, when developing a graphic interface program, you can temporarily change. pyw to. py, so that the console window can be called up during running, and all error messages can be seen to facilitate pest removal.