Simple development of Python tutorials

Source: Internet
Author: User

The Python tutorial is a language that we often use in computer application languages. The article below is a simple Python tutorial on how to use vim for development. I hope it will be helpful to you, the following is a detailed description of the article, hoping to help you and increase your interest.

  • Effect of using the Python programming language in Java
  • Python command line code Enhanced memory
  • Convert Python print encoding to default encoding
  • The Python language is used in the MySQL database to solve the problem.
  • How to solve Chinese garbled characters when using Python to connect to a database

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, then vim, and gvim in Chinese after installation. I don't know why, but I am in sf.net. copy vim to the pluins directory, open the _ vimrc file under its directory, and add map :! Python.exe cute, then set the system environment variable in my computer, add the path of python.exe in the pathvariable, that is, the path where you install python, and then open gvim to enter the code. Then, directly enter 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 by the Pythonjiao tutorial 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" has been downloaded online and is in PDF format.

Next, I will introduce several entry-level frequently asked questions.

The command line mode of python does not support Screen Cleaning. You need to run the following command:

 
 
  1. .>> import os  
  2. .>> os.system('cls')  

Why is the following code running directly by entering the first two lines and pressing enter in python commond?

 
 
  1. .>> import os  
  2. .>> os.system('cls')  

In fact, the commond mode is only an interactive mode, after entering the code in IDLE or vim, You can execute why my comments and strings contain Chinese characters and cannot run. I want to convert my programs to exe, this allows others to use it on their machines. When distributing your program, remember to package w9xpopen.exe, python25.dll, and library.zip. Otherwise, the program may fail to be executed. The above is a detailed introduction to the Python tutorial.

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.