Generally speaking, every programmer has his or her own weapon: a code editor. If you let him change his development environment, I’m afraid the development efficiency will drop by at least 30%. However, everyone’s preferences for editors are different, even leading to a belief debate between “God’s editor” and “editor’s God.” But that’s how important a personalized editor is to a programmer.

For novice programmers, the choice of a development environment is often the first hurdle. It’s not uncommon to be forced to go from starter to quit because you’ve been tinkering with code for a long time and it doesn’t work. The ease of using the editor you choose when you first start out will also have a direct impact on your enthusiasm for learning.

Today I’ll talk about my experience with the Python editor.

There are two types of tools we use to write Python:

One is integrated development environments called ides, which are designed for development. Such as IDLE, PyCharm, Spyder, etc.

The other is more like a text editor, only more powerful and can support writing and running code. SublimeText, Emacs, Vim, etc. Here I mainly introduce my personal ordinary use of a few.

1. IDLE


Indeed, IDLE is not a “good” editor at all. Whether it’s autocomplete, syntax hints, project file management, or even highlighting hints, it either doesn’t support them or barely does. The “user experience” is almost non-existent, and worse, it often doesn’t work or type on certain systems or versions.

But I can’t help it. People are sons! After installing Python, you don’t have to do any configuration (not even bother with environment variables), and you can write and run code with it. What’s a bike or a watch for a rookie with no computer skills? Just write it!

So in my zero-base tutorial, as in many other entry-level tutorials, IDLE is used as the demo development environment to start with. But I have to stress that IDLE is just a gateway to the programming world. It gets you started quickly, but it doesn’t follow you anywhere. Find your tools as soon as possible.

2. SublimeText


Sublime is a feature-rich text editor. In addition to writing Python, I also use it to write other code such as JS, HTML, CSS, and it is also my daily notepad and text editor. Most of the posts you see on wechat, the original draft is written in Sublime.

By default, Sublime can run.py files with syntax hints and completion if you have Python installed on your computer. There is no support for more complex syntax checking, nor for console input, but additional plug-ins can be installed to complement the functionality. If you have multiple versions of Python on your computer, the choice is a little more complicated. So I turn Sublime on all the time to write code snippets or to review assignments submitted by students.

Sublime is a premium software, but is free to use.

3. PyCharm


This is the main development tool I recommend in the course and in the q&A group. Aside from a bit of trouble with the initial configuration and a bit of slow startup time, it works really well. PyCharm provides the management of coding and third-party libraries within the project to form a small sandbox, avoiding the interference of other configurations in the system to the development environment, and reducing the number of pits for beginners. Unfortunately, if you’re not configured the way it’s supposed to be, you could end up in a new pit.

My personal development work with PyCharm has focused on courses and demo projects. If you’re having problems with other editors, try sticking to my example to reduce unnecessary hassles.

PyCharm is also a paid app, but there are free community and educational versions (application required). I use the community edition, which has enough features to learn. If you must need Chinese version or professional version, you can search online.

4. IPython


IPython is an interactive development environment, an enhanced version of the Python Shell we used at the beginning of the course. PIP install ipython is available for installation. The main additions are autocomplete and history command recording, and syntax highlighting is a bit more comfortable. But novices may not be able to use it. If you get to the point where you’re running code on the server, by all means install one.

Like Sublime, I had IPython on all the time. Because interactive environments are great for debugging a few lines of code, testing the features of a syntax, looking at method calls in a module, or even looking at documentation with help(). For those of you who have watched me answer questions, I often run a code in IPython to answer questions. I strongly encourage you to get into the habit of running code, especially if you’re reading a book or tutorial. Don’t just read it. Many questions are learned naturally after a few attempts.

5. Jupyter


IPython Notebook. It’s a web version of the aforementioned IPython, but not just a web version.

I didn’t use it much before, but recently I kind of fell in love with it: it’s so comfortable to write crawlers or data analysis with! Writing crawlers involves trial and error, and with interactive Jupyter, you can fix your code step by step, rather than having to start from scratch every time. Data analysis is because it works well with Both Matplotlib and Echarts, with no pop-ups and drawing results displayed directly on the page.

For those of you who want to dig deeper into data analysis, grab a copy of Data Analysis with Python and use an open Jupyter page as examples.

Plus, since it’s a web version, you can even use it to make an online Python tool for writing code anywhere, anytime, if you have a server. But use it for your own use, never publish it directly, it will expose your server environment.

5.Emacs


Finally, god’s editor. This is an old habit developed over the years. The coding classroom website that you see was written on Emacs. But this threshold is higher, there is no recommendation, we have a look.


I changed my keys to use Emacs. Your fingers have been hurting lately. Consider adding a foot pedal.

These are my usual editors. It’s kind of split, but it does have its advantages. So there’s no need to argue about which is better, just choose what works for you according to your needs.

For beginners, I still suggest PyCharm, which has perfect functions and is relatively balanced in all aspects. Having previously written two introductory articles on PyCharm,

PyCharm can be seen on the public account (Crossin’s programming classroom).

But it seems that there have been some changes in the latest edition, and I may have to write a new one.

There are many other excellent editors, such as VSCode, Atom, Vim, Spyder, etc. (PyScripter is not recommended), but I will not carry the online introduction because I have no long experience in using them. If you are using it or are interested, there are many tutorials under search. There are recommended welcome message. But just the few I mentioned above are enough.

As the title says: To do a good job, you must sharpen your tools. If you choose a good editor, you’ll learn a lot more quickly, at least you won’t make mistakes like missing half a parenthesis or missing half a quotation mark.

But in the end, the tools come down to who uses them. A notepad can be great if you write enough. (But seriously: If you’re not a big fan, don’t use Windows Notepad for anything development-related!)


Oh, oh, oh, oh, oh, oh, oh

Novice Python | how to self-study guide | select Python q&a | | | | block chain Python wordlist artificial intelligence double 11 | | | hip-hop creeper sorting algorithm | | | | the university entrance exam in Python World Cup I requests

Welcome to search and follow: Crossin programming classroom