Python automated test eclipse + pydev build development environment

The reason why c#is easy to make people interested,Because after installing visual studio, you can write programs directly.No configuration is required. For newbies,This is a very good "first experience" that will inspire the self-confidence and interest of beginners.

The configuration of the development environment of some languages ​​is very troublesome, This makes newbies frustrated,Without a good "first experience", you may be in awe of the language, And lose interest.

as a.Net programmer, used to visual studio. The power of visual studio,Such as smart prompts,Autocomplete, etc.Can greatly reduce our memory and workload.Without smart prompts, That's going crazy. Now olderCan't remember those function names at all, You have to rely on smart hints from ide.

Learning python, the first most important thing,Is to choose an ide, it is best to have features like visual studio.

This article focuses on why the eclipse + pydev plugin is used to write python code, and how to configure eclipse + pydev and windows on the mac

Read the catalog

Good ide has at least these functions Editor:python comes with idle Editor:vi Editor:eclipse + pydev plugin Install python Install java jdk Download eclipse Introduction to pydev plugin Install pydev plugin in eclipse Configure pydev interpreter Start writing code

Good ide has at least these functions

Smart prompt(This does not require memorizing the function name,Already class library,It can be called through smart prompts, And the function name is not wrong.)

2. Debug under breakpoints (during program writing,Must be able to breakpoints,Looking at the variables, Step by step. This makes it easy to read code written by others)

3. Auto-Complete (can speed up writing code)

4. Syntax error prompt,(The scripting language is executed step by step. It will not be until the syntax error until execution. If ide can find syntax errors in the compilation process in time)

5. Easy to read code,(From a file, To another file,Support reading backwards,See what's defined.)

Editor:python comes with idle

Simple and fast, When learning python or writing small software.very useful.


Must master, Universal editor. Can do a lot of program development, Ruby, Python are fine. Support windows and mac. 80%of my colleagues use this to write code.Looking at their screen,Full screen code,Very programmer-like.

do not know why, I'm not very used to it personally. May be used to a graphical interface like visual studio.

But the basic operation of this is still necessary. For example, when editing a file, Can be edited with vi. Convenient. Use vi for large-scale development, I am not very used to it

Editor:eclipse + pydev plugin

1. eclipse is an ide written in java, so it can be used universally,Learning costs are small. After learning eclipse, you can write python or java in the future.

2. eclipse, powerful.

3. eclipse cross platform, can run on mac and windows

Install python

Python is available in Python 2 and Python 3. There are some differences in syntax. In case, I installed python 2.7.5

Install java jdk

eclipse needs this java jdk installed to run

Download eclipse

http://www.eclipse.org/downloads/Download here.

After downloading,Unzip it and use it directly, eclipse does not need to be installed.

Introduction to pydev plugin

Official website of the pydev plugin:http://www.pydev.org/

Install pydev plugin in eclipse

Start eclipse, click help->install new software ... In the pop-up dialog box,Click the add button. Fill in the name:pydev, fill in the location http://pydev.org/updates

Then install it step by step. If the installation process,Reported wrong. Just reinstall.

Configure pydev interpreter

After installing pydev, you need to configure the python interpreter.

In the eclipse menu bar,Click on windows->preferences.

In the dialog,Click pydev->interpreter-python. Click the new button, select the path of python.exe, and open a window with a lot of check boxes. Point 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 and enter a project name.

Create a new pydev package. You can write code.

  • Previous jQuery + Pdo write login interface
  • Next Comprehensive analysis of the differences between $Apply () and $Digest () in Angular