The method to enter python from cmd is as follows
1 Enter python
Open cmd-enter python directly, as follows
2 Exit python
Method 1: Press Ctrl+z first, and then press Enter (Enter)
Method 2: Type exit() and press enter
Method 3: Enter quit() and press enter
Content expansion:
To run python under windows cmd, you need to set environment variables. You can't run python under cmd if you don't set environment variables. Now suppose python is installed in the C:Python25 directory. The method of setting environment variables is as follows:
Method 1: My Computer-Properties-Advanced-Environment Variables-System Variables, find PATH in the system variables, double-click PATH, and add ";C:Python25" at the end (no quotes)
Method 2: Shortcut key (WIN+R) Enter "cmd" in "Run" and enter set PATH=%PATH%;C:Python25 in the command prompt, and then enter python in the current cmd, namely Can run.
So far, this article on the steps to enter python through cmd is introduced. For more information about how to enter python content in cmd, please search for ZaLou.Cn's previous articles or continue to browse the related articles below. Hope you will support ZaLou more in the future. Cn!
Recommended Posts