C # is easy to get interested in because after Visual Studio is installed, you can simply write programs directly without any configuration. For beginners, this is a good "first-time experience" that will stimulate their self-confidence and interest.
However, the configuration of some language development environments is very troublesome, which makes it frustrating for new users. If they do not have a good "first-time experience", they may lose their interest in this language.
As A. NET programmer, I am used to Visual Studio. Visual Studio's powerful functions, such as smart prompts and Automatic completion, can greatly reduce our memory and workload. If there is no smart prompt, it will go crazy. When I am older, I cannot remember those function names. I must rely on the Smart prompts of IDE.
To learn Python, the first and most important thing is to select an IDE. It is best to have functions like Visual Studio.
This article focuses on how to use the Eclipse + pydev plug-in to write Python code, and configure Eclipse + Pydev on Mac and Eclipse + Pydev on Windows.
Reading directory
- Good IDE has at least these functions
- Editor: Python built-in IDLE
- Editor: VI
- Editor: Eclipse + pydev plug-in
- Install Python
- Install JAVA JDK
- Download Eclipse
- Pydev plug-in Introduction
- Install the pydev plug-in Eclipse
- Configure the pydev Interpreter
- Start writing code
Good IDE has at least these functions
1. Smart prompt (you do not need to remember the function name. You can call the function by using a smart prompt without making a wrong function name .)
2. breakpoint debugging (when writing a program, you must go to the breakpoint to view the variables and execute them step by step. This makes it easy to read the code written by others)
3. Automatically complete the function (which can speed up code writing)
4. syntax error prompt (the script language is executed step by step until it is executed until the syntax is incorrect. If IDE can promptly discover syntax errors during compilation)
5. Easy to read code (from one file to another, you can read the code and view the definition .)
Editor: Python built-in IDLE
It is simple and quick. You can learn Python or compile small software. Very useful.
Editor: VI
Must be mastered, universal editor. You can develop many programs, including ruby and Python. Supports both Windows and Mac. My 80% colleagues use this code. Looking at their screens, full screen code, very programmers feel.
I don't know why. I am not very used to it. It may be that you are used to graphical interfaces such as Visual Studio.
However, this basic operation is still required. For example, you can use VI to edit an object. Convenient and quick. I am not used to using VI for large-scale development.
Editor: Eclipse + pydev plug-in
1. Eclipse is an IDE written in JAVA, so that it can be used in general, with a low learning cost. After learning Eclipse, you can write Python or JAVA.
2. Eclipse is powerful.
3. cross-platform Eclipse, which can run on Mac and Windows
Install Python
: Http://www.python.org/
Python is available in Python 2 and Python 3. There are some differences in syntax. To be safe, install Python 2.7.5.
Install JAVA JDK
: Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Eclipse can run only after java jdk is installed.
Download Eclipse
Http://www.eclipse.org/downloads/ to download it here.
After downloading, decompress the package and you can use it directly. Eclipse does not need to be installed.
Pydev plug-in Introduction
Official pydev plug-in Website: http://www.pydev.org/
Install the pydev plug-in Eclipse
Start Eclipse and click Help-> Install New Software.... In the displayed dialog box, click Add. Name fill: Pydev, Location fill http://pydev.org/updates
Then install the SDK step by step. If an error is reported during installation. And then reinstall it.
Configure the pydev Interpreter
After installing pydev, you must configure the Python interpreter.
On the Eclipse menu bar, choose Windows> Preferences.
In the dialog box, click pyDev-> Interpreter-Python. Click the New button and select the path of python.exe. A window containing multiple check boxes is displayed. Click OK.
For Mac systems, click "Auto Config ".
Start writing code
Start Eclipse and create a New project, File-> New-> Projects... select PyDev-> PyDevProject and enter the project name.
Create pyDev Package. You can write code.