Python Development Environment Building

Source: Internet
Author: User

Python

Python (English pronunciation:/?pa?θ?n/), is an object-oriented, interpreted computer programming language, invented by Guido van Rossum at the end of 1989, the first public release released in 1991, the Python source code also follows the GPL (GNU General public License) Agreement [1]. The Python syntax is concise and clear, with a rich and powerful class library.

PS: The first contact with the Python language or the PyS60 on the Symbian phone that was played at school.

First, go to http://www.python.org/download/to download the latest version of Python.

Now the latest version is 3.4.3 and 2.7.9, as to why there are two of the latest version of this is a legacy of history. Interested can look at the difference between them.

I've installed 2.7.5 before, just take this version demo.

Second, directly double-click the installation, all the way next.

Third, environment variables

I installed it under C:\Python27 and added the C:\Python27 directly to the PATH environment variable.

Iv. Configure the environment variables so that you can enter Python at the command prompt to open the Python command-line interpreter.

Now you can enter the Python statement, and the interpreter executes the input statement and prints the output.

The Python installation comes with a GUI development environment, which can be found in the Start menu.

Click Open, this is similar to the command prompt character, and the input statement executes and outputs.

Wu, EditPlus

EditPlus is a powerful text editor. With unlimited Undo/redo, English spelling checker, word wrap, column number tagging, search substitution, simultaneous editing of multiple files, full screen browsing, the ability to monitor scrapbooks, to sync to a scrapbook to automatically paste text into EditPlus's editing window, or to edit HTML pages.

To create a new custom tool group:

    • Tools-Configure custom tools to open the custom tools configuration interface.
    • Click on the "Group name" button on the right side of the panel to change the text "Group1" to "Python", and the group name can be filled in freely.

To add an execution function:

    • Click "Add Tool" button, select "Program", create "new program", select it.
    • The contents of "menu text" are changed to "Python", and can be filled in freely;
    • "Command" to fill in the compiler "Python.exe" path, you can browse to find, such as: "C:\Python27\python.exe", if you have the correct environment variables, you can directly fill in "Python."
    • "Parameters" fill in, click on the right drop-down button, select "File name", that is, "$ (Filenamenoext)", you can write directly.
    • "Start directory" fill in, click the right drop-down button, select "File directory", displayed as "$ (filedir)", you can write directly.
    • Select the Capture output check box to enable EditPlus to capture console output.

The above configuration process is to simulate the Python run process: Python hello.py

To configure the output mode:

The output mode uses regular expression matching to capture console output information, such as capturing compilation error information and quickly locating the file and location of the compilation error. The EditPlus has built-in common output matching patterns, but not python.

Input: File "(. +)", line ([0-9]+)

After this configuration, a compilation error occurs, so long as you double-click the error message, you can quickly locate the wrong location.

Template files, syntax highlighting files:

Syntax highlighting file: PYTHON.STX; This allows syntax highlighting to be supported by opening a Python source file.

Auto-complete file: PYTHON.ACP; Edit the python source file, enter the defined keyword to automatically enter the associated content.

These two files can be downloaded to https://www.editplus.com/.

The custom tool selects "Python" that was previously configured.

Template files:

Template file: A template for creating a new Python file that defines templates for commonly used code, so that when you create a new Java file with EditPlus, you open a

Copy, eliminating the time to repeat the entry.

VI. Sublime Text

Sublime text is a code editor (Sublime text 2 is a paid software, but can be tried indefinitely) and is also an advanced text editor for HTML and prose. Sublime text has a beautiful user interface and powerful features such as code thumbnails, Python plugins, code snippets, and more. You can also customize key bindings, menus, and toolbars. The main features of Sublime Text include: Spell checker, bookmarks, full Python API, Goto feature, instant item switching, multiple selection, multiple windows, and more. Sublime Text is a cross-platform editor that supports operating systems such as Windows, Linux, MAC OS, and more.

With the lightweight editor, the previous use of EditPlus more, and later found sublime text this artifact after EditPlus used relatively little.

Sublime text original support python, plug-ins can also be written with Pyton, Sublime text plug-in system is very powerful, configuration is relatively free, flexible, should have a large number of loyal users.

Specific sublime text configuration process will not repeat, related articles more.

Python development Environment Setup

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.