If you search in search engines (such as Baidu) or various Q & A communities (such as Zhihu) for “which ide / editor is the best for learning Python?”
I think the answer must be pycharm, jupyter, vscode, VIM, sublime text
But in my opinion,Best editorIt should depend on the situation, e.g
- If you are engaged in data analysis and machine learning, jupyter is recommended
- If you are engaged in large-scale engineering projects, you should often read the open source project code. It is recommended that you use pycharm
- If you need to use multiple editing languages and don’t like using JB’s cracked software, it is recommended that you use vs code
- If you are idle and pursue geeks, it is recommended that you use vim
In addition, there are many excellent Python code editors, such as sublime text, atom, wing, spyder, etc.
But you probably haven’t used the IDE I’m going to introduce today, and you may not even have heard of it. It’s called
Thonny, it is developed by Tartu University and suitable for novice programmers. The interface has no complex or redundant functions and is easy to use. Another good place for novices is that you can see Python evaluate your expression at each step.
I recommend that all novices to Python install a thorny.
The reasons are as follows.
- It supports full platform (windows, MAC, Linux)
- It supports simplified Chinese and is very friendly to students who are not good at English
- Its interface is simple and straightforward, and its built-in functions are completely for novices
- It has built-in Python 3 and does not require novices to install Python and configure the environment
- Its debugging interface is very intuitive and can be used to hang 90% of the editors on the market
- It provides a debugging mode with smaller granularity than the code line, which is one of its highlights
- It supports syntax highlighting, which should be the basic function
- It supports code completion (unfortunately, it is not automatic, but manual)
- It has a very simple and easy-to-use graphical interface package manager built in
Let’s demonstrate one by one
1. Full platform support
Whether you are using win, MAC or Linux, thorny has the corresponding version support.
I have packed all the installation packages of win and MAC versions, which can be downloaded here:https://wws.lanzous.com/iX5rW…
For Linux users, you need to use the command to install
# Binary bundle for PC (Thonny+Python): $ wget -O - https://thonny.org/installer-for-linux) # With pip $ pip3 install thonny # Debian, Raspbian, Ubuntu, Mint and others: sudo apt install thonny # Fedora $ sudo dnf install thonny
2. Support simplified Chinese
Although thorny was developed by foreigners, it also supports simplified Chinese, which is really good for beginners with poor English.
When you install, you will be prompted to select a language
If you forget the settings during installation, you can also change them again in the menu bar.
3. Built in Python
For novices, the most important thing is to have an environment that can run code as soon as possible
Thonny has built-in Python 3.7.9, so it doesn’t need you to download the Python interpreter on the official website or learn how to configure environment variables.
You can know the installation path of Python by looking at the path of the OS module
Of course, if you think Python 3.7 is outdated, you can set it if you want to use the latest Python 3.9
4. Simple interface
The interface of the whole software is very simple. It can be said that there are no redundant functions, and there are many functions.
Just open a python script for testing and click the run button in the upper right corner to run the script program. The contents printed in the program will be printed in the shell window. It is easy to see from the interface. In fact, after you click the run button, you execute a script in the shell window
%Run xx.pyMagic orders.
5. Visual package manager
At the same time, he also comes with a visual package manager to facilitate novices to install and uninstall various third-party packages of Python
6. Manual code completion
At the same time, as a simple IDE, thorny also supports code completion, but the code completion is not so intelligent and needs to be triggered manually by pressing the shortcut key (⌃ + s).
7. Amazing debugging function of the whole seat
If the above is not enough to impress you, don’t worry. Let me introduce thorny’s most amazing debugging function.
Call up through the menu bar
Variable panelAt this time, the variables defined in the shell will be displayed on the variables panel. Once you modify the variables, the variables panel will also be refreshed in real time.
Click the little beetle on the control panel to enter the debugging mode, and the four buttons next to the beetle will light up
Step overStep over: single step debugging in code behavior units
Stepping(step into): single step debugging with finer granularity than step-by-step debugging, which can enter the function
Step out(step out): from execution to the end of function execution
resumption of execution: execution to the end of the program
Eh, you must say, brother Ming, don’t worry about the title party. Don’t you have all these functions on pycharm?
Don’t worry, please continue to look down. The effect of step-by-step debugging in thorny, even pycharm, has not achieved such a debugging experience convenient for novices to learn.
It can split a single line expression into multiple steps for debugging. In this process, the variable name in the expression will be directly displayed as its value, which is very helpful for novices to understand complex single line expressions.
Please see the following dynamic diagram for details,
age <= 3This expression will first display the variable value of age, then perform logical operation with 3, and then display the operation result.
When you use
SteppingAfter entering the function call, each step of calling the function will reopen a new window with a separate local variable table and code pointer. It can help learners fully understand the principle of function call, especially for understanding the relatively complex logic of recursion.
The following is a generationFibonacci sequenceFunction as an example
Step debugging in thorny can be said to be a highlight of it, but unfortunately, thorny does not support setting breakpoints at present, which is a pity.
8. List of shortcut keys
Shortcut keys for windows
9. Write at the end
Take Python and use python. Thorny is a visualization tool developed based on the built-in graphics library Tkinter in Python. It is a lightweight Python ide completely for Python beginners. It can help beginners understand the running details of each line of code. It helps Xiaobai solve some complex environmental problems and really learn immediately.
In my opinion, it is the most suitable IDE for Python beginners. I recommend it to you.
Thorny download link:https://wws.lanzous.com/iX5rW…