"Go" python Automation test (i) Eclipse+pydev build the development environment

Source: Internet
Author: User

Original URL: http://www.cnblogs.com/TankXiao/archive/2013/05/29/3033640.html

C # is interesting because it is easy to write a program directly after installing visual Studio, and it does not need to be configured. For beginners, this is a very good "first experience" that will inspire the beginner's confidence and interest.

While some language development environment configuration is very troublesome, this lets the novice has the frustration feeling, does not have the good "first experience", may be in awe of this language, but loses the interest.

As a.  NET programmer, accustomed to visual Studio. The powerful features of Visual studio, such as smart tips, auto-completion, and so on, can reduce our memory volume and workload a lot. If it's not smart, it's going to freak out. Now that you're old enough to remember the function names, you have to rely on the IDE's smart hints.

The first and most important thing to learn about Python is to choose an IDE, preferably with the functionality of Visual Studio.

This article focuses on why you use the Eclipse+pydev plugin to write Python code and configure Eclipse+pydev and Windows configuration on your Mac Eclipse+pydev

Read Catalogue

    1. Well, the IDE has at least these features.
    2. Editor: Python's own IDLE
    3. Editor: VI
    4. Editor: Eclipse + Pydev Plugin
    5. Install Python
    6. Installing the Java JDK
    7. Download eclipse
    8. Pydev Plugin Introduction
    9. Installing the Pydev plugin in eclipse
    10. Configuring the Pydev Interpreter
    11. Start writing a code

Well, the IDE has at least these features.

1. Smart hints, (this does not require the memory function name, already the class library, through the smart prompt can be called out, and will not mistake the function name.) )

2. Next breakpoint debugging (in the process of writing a program, you must be able to drop breakpoints, view variables, step by step execution.) This makes it easy to read code written by someone else.

3. Auto-complete function (can speed up writing code)

4. Syntax error hints, (the scripting language is executed step-by-step until execution is not until a syntax error.) If the IDE can find a syntax error in the compilation process in time)

5. Easy to read code, (from one file, to another file, support reading back, view definition, etc.) )

Editor: Python's own IDLE

Quick and easy, learn python or write small software. Very useful.

Editor: VI

Must master, the Universal editor.  Can do a lot of program development, Ruby, Python can.  Supports Windows and Macs. My 80% colleagues use this to write code. Look at their screen, full screen code, very programmer's feeling.

I don't know why, I'm not used to it personally. may be accustomed to a graphical interface such as Visual Studio.

But the basic operation of this is still going to happen. For example, to edit a file, you can use VI to edit. Convenient and quick. Use VI to do large-scale development, I personally not very used to

Editor: Eclipse + Pydev Plugin

1. Eclipse is the IDE that writes Java, so it can be generalized and the learning cost is small. Learn eclipse and write Python or Java later.

2. Eclipse, a powerful feature.

3. Eclipse Cross-platform, can run on Mac and Windows

Install Python

: http://www.python.org/

Python has 32 versions of Python 2 and Python.  There are some differences in grammar. To be safe, I'm installing Python 2.7.5

Installing the Java JDK

: http://www.oracle.com/technetwork/java/javase/downloads/index.html

Eclipse requires this to install the Java JDK before it can run.

Download eclipse

http://www.eclipse.org/downloads/to this download.

Once downloaded, the decompression can be used directly, and eclipse does not need to be installed.

Pydev Plugin Introduction

Pydev Plugin's official website: http://www.pydev.org/

Installing the Pydev plugin in eclipse

Launch Eclipse, click Help->install New software ...  In the popup dialog box, click the Add button. Name fill in: Pydev, location fill http://pydev.org/updates

Then, step by step, put it down. If the process of loading, error. Re-install it.

Configuring the Pydev Interpreter

After installing Pydev, you need to configure the Python interpreter.

In the Eclipse menu bar, click Windows->preferences.

In the dialog box, click Pydev->interpreter-python. Click the New button, select the path of the Python.exe, and open it to display a window with many check boxes. Click OK

If it is a Mac system, click the "Auto Config" button

Start writing code

Start Eclipse, create a new project, file->new->projects ... Select Pydev->pydevproject to enter the project name.

New PyDev package. You can write the code.

"Go" python Automation test (i) Eclipse+pydev build the development environment

Related Article

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.