We will be exposed to some related solutions for getting started with Python in related materials. Maybe you have an untrusted idea about the materials reposted N times, you can read the following articles to learn more about Python.
People say that dynamic language is now emerging, and it may be the world of Dynamic Language in the future. So let's take a look at it. At least it is really good to write a script for a small auxiliary tool. I will introduce the super cainiao first. Write down how to use vim to develop a simple python program. I hope it will be helpful to everyone and it will be easy to start.
Build Environment first
Download python, gvim, and python first. vim to python I installed 2.5, gvim is an editor, python. vim is an extension of vim. with vim, you can use it to edit python to highlight the syntax. If you want to automatically complete the syntax, search for it online. google is recommended ), install pythoh first, and then vim. After gvim is installed, it is in Chinese. I don't know why, but I am in sf.net ).
- How to efficiently complete the work in the Python Library
- Use the Python programming language design philosophy to solve the disadvantages of Programming
- Steps for organizing Python source code
- It is easy to install Python.
- Analysis of Python source code
Copy python. vim to the pluins directory, open the _ vimrc file in the directory, and add map <F5> at the bottom :! The path of python.exe cute is the path where you install python. Then you can open gvim and enter the code. Then, you can directly input print 'hello, wawa 'and save it as mypy. py.
Press esc to exit the insert mode or Press esc. Press f5 to insert "f5" to the code. Press F5 to run your first python program. For other vim operations, google seems to have a Chinese manual.
The download path of the above three files can be found by google. I am afraid that the path will change later. My current gvim is 7.1, python is 2.5, and python. vim is searched for the python keyword in the vim project of sf.net.
Good. The environment is ready. Start learning. The following articles are recommended for beginners.
Python tutorials
Now, let's take a look at the "Python Tutorial Python Getting Started Guide". The "concise Python Tutorial" is available for download on the Internet. It is another example of several entry-level FAQs about PDF. the python command line mode does not support clear screens, run the following command:
- .>> import os
- .>> os.system('cls')
Why is the following code running directly by entering the first two lines and pressing enter in python commond?
- try:
- print input()
- except:
- print 'there is an error in your input'
In fact, the commond mode is only an interactive mode. You can enter the code in IDLE or vim and then execute the above content to introduce the related solutions for getting started with python.