Graphic tutorial for installing and using python in Windows
Install and use python in Windows
I. How to Run python
The python interpreter is a program that allows other programs to run. When you write a python program, the python interpreter reads the program and runs the program according to the command to get the result. In fact, the interpreter is the software logic layer between the Code and the computer hardware of the machine.
In general, our computers perform operations based on binary. No matter what language you use to write programs, no matter how simple or complex your programs are written, it must be 0 or 1 for the computer to run, because the computer can only recognize 0 and 1.
Most of the programming languages we are currently using are advanced programming languages, which are good for us to read. To enable our programs to run on computers, A certain degree of conversion is required. The general process of the python program should be as follows:
Source code --> bytecode --> pvm (Virtual Machine) --> machine code
You can download Python (http://www.python.org) from python's official website, typically including interpreters, library files, and simple coding environments (IDLE ). Compiling source code into bytecode is actually to save time for the program. If the source code is not changed, the program will be directly read from the bytecode during running, speeding up the speed, place the bytecode in the Virtual Machine for better cross-platform operation and finally convert it into a machine code.
Ii. Build a python programming environment in Windows
1. Go to the Python official website http://www.python.org, in the "Downloads" drop-down menu select the corresponding operating system, we choose windows.
2. There are 32-bit and 64-bit versions, which correspond to your computer system.
3. Install the downloaded installation package. Use the default configuration and select "Install Now". Check the "Add Python3.5 to PATH" option and continue to "next" until the installation is complete.
3. Understanding programming environment
1. Run cmd at the start of the operation to perform the dos mode. Input python to perform the python interactive environment.
2. Go to the IDLE Interface
3. The interactive interface can be used for simple learning. When writing a large program, it should be written into a specific python file. The default Suffix of the python file is. py, we can create a new text file, and then change the suffix extension. py, and then
Finally, select the Run module under run in the menu to Run. The shortcut key is F5.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.