Solve the Problem of running the cmd window (dos window) on windows)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.