An example of a python development environment under eclipse

Source: Internet
Author: User
First, download Eclipse, website address: http://www.eclipse.org/downloads/
Second, download the JDK, after installation, configure the environment variables.
Website address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Third, download and install Python, here is the choice of 2. The latest 2.7.6 version of the X series. The python syntax for the 3.X series is slightly different from the old version. Website address: http://www.python.org/downloads/
Iv. Integrate the Python development tool Pydev into Eclipse, as follows:
Open Eclipse,help,install New Software ... Select Add,
Name Fill pydev,location fill Http://pydev.org/updates. Then click OK, start the search, and finally the following results, select the first Pydev.
All the way next, go to the installation path selection interface, use the default settings, and Finish. Finally, you can restart eclipse.
V. Configure the Interpreter.
There are 3 types of interpreters that can be configured within the Pydev: IronPython, Jython, Python, where Python is used by default.
In order to debug a Python program in Eclipse, the configuration interpreter steps are as follows:
In the Eclipse menu bar, select Window,preferences,pydev,interpreter,python interpreter. Then new,name fill in the Python_interpreter and the path selects the Python.exe under the Python installation folder.

Six, Hello,python
in the Eclipse menu bar, select File,new,pydev project,name to fill Hellopython, all the way to next. Engineering directory, right key New,pydev Module.
In the editor, enter one line:
print "hello,python!"
Run, let's start the Python tour. The

Seven, Python Chinese issues

First make sure that the Eclipse Editor environment is encoded as UTF8, which is the premise; second, if the py file contains Chinese characters, you need to declare the encoding in the py file.

1. Modify the Eclipse editor encoding

A to set the workspace encoding: Window-> preferences-> workspace->utf-8

B) Setting Editor Encoding: Window-> Preferences-> editor-> Text editor-> spelling->utf-8

C) Set configuration encoding: Open Eclipse installation directory->eclipse.ini, last line plus   -dfile.encoding=utf-8

D) To modify the Python file encoding: Add #coding=utf-8 to the first line of the Py file, and be sure to do it on the first line

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.