Why is it different to run. py in cmd and powershell?

Source: Internet
Author: User
I already know how to deal with the original question. Sorry, as a beginner, there is still much to do. No matter what the responder is, thank you for your answers. However, running in CMD does not need to write python in the command to enable python to open py, while powershell does need to write python in the command. For other differences, let's talk about this, at the same time, let's talk about what python needs to do... I already know how to deal with the original question. Sorry, as a beginner, there is still much to do. No matter what the responder is, thank you for your answers. However, running in CMD does not need to write python in the command to enable python to open py, while powershell does need to write python in the command. For other differences, let's talk about this, at the same time, let's talk about what python needs to do... reply content:

The subject has modified the question. For the original question, you can view the question log. For the new question, I personally don't know much about Python, so I won't make a shift. You can refer to other people's answers.

-------------------------------------------------------------------------


Are you sure you want to die?

He didn't ask you to use. \ rr. py, and I remember that you only need python to start this file. If you have any questions
$ PROFILE

$ Env: PATHEXT + = ";. py"
The most common problem I encountered was coding. The codepage for cmd and powershell to display Chinese characters is different. If your codepage is not set. Text garbled. The program reports an error .. Python xx. py should be a file type interface provided by powershell that cannot directly identify xx. py. It requires you to write./xx. py to recognize this script. The latter format is more in line with the file expression in linux and easier to be recognized by the old shell file type interface.
The cmd file interface is newer. You can directly identify the xx. py file and call the python interpreter.
In fact, it is not so much trouble to write python xx. py. Incorrect. Please delete it.

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.