Key Takeaways
- Sublime Text was found to be the most popular code editor among Pythonists, with 45% of those surveyed preferring it. Other popular editors include Vim, Emacs, Notepad , and TextWrangler.
- Sublime Text’s popularity is attributed to its robust package manager, macros, color customization, comprehensive language support, quick navigation, command palette, and extensive customization options.
- Despite its popularity, Sublime Text has some shortcomings for Python programming, such as unpolished static analysis and refactoring features, inadequate dynamic analysis of code and autocomplete, and a complex interface that can be intimidating for beginners.
- The article provides a detailed guide on setting up Sublime Text for Python programming and suggests checking out a collection of plugins for Python development with Sublime Text.
Not into Python? Prefer Ruby instead? Here are the most popular editors and IDEs for Rubyists.
So, you’ve decided to learn Python? Great! Python is a really interesting programming language, that has been described as a descendent of ABC that appeals to Unix/C developers. And you can’t go wrong with a language named after Monty Python!
So yes, you have many exciting things waiting for you.
But one of the first things you’ll need to do is pick an editor you’ll use to write your Python program. Well, here comes the confusion. You’re faced with tons of editors out there, each with a community trying to get you attracted to using that editor. “Use vim!” “Use Emacs!” “Use Sublime Text!”
You recoil in fear… what if you make the wrong choice?
This feeling inspired me to interview Pythonists about their favorite Python editor. This will show which editors are used by the most Pythonists, and from there we can try to work out why. My hope is that it’ll serve as a guide for newcomers to Python, or even for those already working with Python.
I’ll start by discussing the most popular editors, then take a look at the advantages (and disadvantages) of the winner, before moving on to looking at how to install it onto your system.
The Survey
I spoke to 100 Pythonists, who brought up the following editors (presented here in order of popularity):
- Sublime Text
- Vim
- Emacs
- Notepad
- TextWrangler
- IDLE
- Atom
- Aquamacs
- GNU Nano
- Kate
- gedit
Sublime Text was by far the most preferred editor, used by 45% of the interviewees. The charts below tell the tale:


From the figures above, we can see Sublime Text rules as the favorite Python editor from the sample I have interviewed. This seems to go hand in hand with Sublime Text’s slogan: The text editor you’ll fall in love with.
Sublime Text’s Advantages
So what makes Sublime Text so special?
Like others, I use Sublime for my Python work. I like the features mentioned in this post about Sublime Text. Briefly, these are:
Packages: Sublime Text comes with a fully-featured package manager that helps the programmer to discover, install, update, and remove packages for Sublime Text.
Macros: Instead of retyping simple strings of text, you can simply record macros and create a keyboard shortcut to output that text into your document.
Colors: In Sublime Text, you can quickly pick colors for the interface and text.
Other useful features for Sublime Text, as mentioned in this SitePoint Smackdown post, are as follows:
Comprehensive language support with TextMate-compatible grammar
“Goto Anything” quick navigation to locate files and code
A command palette to access all features
Extensive customization, great themes and numerous plugins
Sublime Text’s Shortcomings
However, Sublime Text still needs some improvements to become a better editor for Python.
Here are some ways Sublime Text could be improved to work better with Python:
In Sublime Text, some deep language specific integration features such as static analysis and refactoring, also available through plugins, are not that polished.
Dynamic analysis of code and autocomplete need to be enhanced.
Sublime Text could be made more friendly to new Python programmers. For example, if one needs to configure the application’s preferences, this is done by writing/editing lines of code. This is something a new programmer may feel uncomfortable attempting.
As a continuation to the previous point, Sublime Text needs to be simplified a bit, as it has a steep learning curve, and plugins need to be simplified, since they can be confusing.
While the app can be equipped with impressive features, these have to be installed separately, and some of them are not free.
Sublime Text is inaccessible via the terminal.
How to Set Up Sublime Text for Python
So, you want to give it a try? In this section, I’ll show you how to setup Sublime Text to work with Python. I will be demonstrating this on a Microsoft Windows 8.1 machine. If you want to do that on a MAC OS X machine, you can follow this tutorial, and on an Ubuntu machine, you can refer to this thread.
Let’s get started.
Installing Python
Download Python from here. I will download Python 3.4.2. This will be an msi file. Thus, the file you will get downloaded is python-3.4.2.msi. Run the installer, for which it will display the wizard shown in the figure below:

Navigate through the steps until you finish the setup wizard. You’ll notice that Python was installed in C:Python34, if you kept the default location.
Installing Cygwin
The next step is to setup Cygwin, a tool for providing Windows with similar functionality to a Linux distribution. If you’re on a 32-bit Windows, download the setup file from here. If you are on a 64-bit Windows, download the setup file from here. After you download the appropriate setup file, run that file, for which you will get the following start page in the wizard:

Keep navigating through the installer until you reach the following step:

In this step, we’ll be installing three software packages: curl, git, and openssh. For this, let’s use the Search box. For example, for curl, type the word in the search box, but, be careful, don’t hit the enter key, as this will continue the Cygwin installation. When you type curl in the search box, you should get something like the following:

What we want to do now is install each of the packages above. Click on the sign. You will notice skip, click on skip, so you get the latest version number of the package, which we want to install. In this case, you should get something similar to the following:

Click the Next button, and wait until the packages are downloaded. This might take some time to finish.
Do the same for the other two packages, git and openssh.
After you finish, you should get a Cygwin shortcut at your desktop, like this:

Through this terminal, you’ll be running your Python code, in addition to accessing the packages installed above. If you double click the icon shortcut, you should get something like the below image:

To make sure that the packages were installed, and get an idea of their locations, we will use the
which command, as follows:

I was able to install Python through Cygwin using the following step (notice ‘Python’ at the end):

If you happen to miss this step, or you want Cygwin to find and use the Python version you installed above, you can issue this command in the terminal:
$ echo "PATH=$PATH:/cygdrive/c/Python34" >> .bash_profile
Installing Sublime Text
Now, for the easiest part. To install Sublime Text, go to the Sublime Text homepage, download, and set it up. Very easy!
Test Your Installation
At this point of the tutorial, let’s test if our setup works, and we’re ready to use Sublime Text to work with Python.
Open Sublime Text, and type this line of code:
print("Hello Python!)
Choose File -> Save. In the Save As dialog box, choose where to save the file, name the file, and in Save as type:, choose Python. For instance, this is what I chose:

Now, open the terminal (Cygwin icon shortcut), and navigate to where you saved your Python file. In my case, it was on the Desktop. In my case, the file path would like like the following:

Finally, type the following command in the terminal to run the Python program:
python hello
In which case, you should get the following output:

You now have everything setup, and ready to delve through the Python world with Sublime Text! One of the first things you should do now is check out this collection of plugins for Python development with Sublime Text.
Conclusion
While Sublime Text has a commanding lead in numbers, that’s but one consideration. There are many popular editors, and it may not be right for every Pythonist. Nevertheless, it’s always good to know how the majority handle their projects, and there is something to be said for using a popular app or technology.
What is your favorite Python editor? How do you set it up for working productively?
Frequently Asked Questions (FAQs) about Python Code Editors
What are the key features to look for in a Python code editor?
When choosing a Python code editor, there are several key features to consider. Firstly, the editor should have syntax highlighting for Python, which makes the code easier to read and understand. Secondly, it should have code completion, which suggests possible completions for your typing and saves you time. Thirdly, it should have a built-in Python debugger, which allows you to test your code and find errors. Other useful features include code navigation, which helps you navigate through your code, and refactoring tools, which help you restructure your code without changing its behavior.
Why is Sublime Text a popular choice for Python developers?
Sublime Text is a popular choice for Python developers due to its speed, efficiency, and powerful features. It has a clean and uncluttered interface, which makes it easy to use. It also supports multiple programming languages, not just Python. Sublime Text has a robust package ecosystem, which allows you to add additional functionality to the editor. It also has a “Goto Anything” feature, which allows you to quickly navigate to files, symbols, or lines.
How does Visual Studio Code benefit Python programming?
Visual Studio Code (VS Code) is a free, open-source code editor that is highly customizable and extensible. It has built-in support for Python, including features like IntelliSense (code completions), linting (for potential errors), debugging, code navigation, code formatting, Jupyter notebook support, refactoring, and more. VS Code also has a large community and a marketplace with thousands of extensions, which can add additional features and functionality to the editor.
What makes PyCharm a suitable Python IDE for professional developers?
PyCharm is a professional Python IDE with a full set of tools for productive Python development. It includes features like intelligent code completion, on-the-fly error checking, quick-fixes, automated code refactoring, and navigation capabilities. PyCharm also integrates with popular Python libraries and frameworks, and supports web development with Django. It also has built-in tools for database management, version control, virtual environments, and more.
How does Atom compare with other Python code editors?
Atom is a free and open-source code editor that is highly customizable and extensible. It has built-in support for Python and includes features like syntax highlighting, auto-completion, and code navigation. Atom also has a package manager for installing additional packages, and a community of developers who contribute packages and themes. However, compared to other editors like Sublime Text or VS Code, Atom is known to be a bit slower and more resource-intensive.
Can I use Jupyter Notebook for Python coding?
Yes, Jupyter Notebook is a popular tool among data scientists and researchers for Python coding. It allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Jupyter Notebook supports over 40 programming languages, including Python. It’s particularly good for data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
What are the advantages of using Spyder for Python development?
Spyder is a powerful Python IDE with features like advanced editing, interactive testing, debugging, and introspection. It’s particularly well-suited for scientific Python development, as it has integrated support for essential scientific libraries like NumPy, SciPy, and Matplotlib. Spyder also includes a multi-language editor with function/class browser, code analysis tools, and a Python console for interactive execution.
How does IDLE fit into the Python code editor landscape?
IDLE (Integrated Development and Learning Environment) is a default editor that comes with Python. It’s a simple editor with basic features like syntax highlighting, auto-completion, and a built-in Python shell. IDLE is a good choice for beginners who are just starting to learn Python, but professional developers might prefer more feature-rich editors like PyCharm or VS Code.
Can I use Notepad for Python coding?
Yes, Notepad is a free and lightweight code editor that supports Python and many other programming languages. It has features like syntax highlighting, code folding, auto-completion, and a function list. Notepad also supports plugins to add extra functionality. However, it lacks advanced features like integrated debugging or code navigation, which are available in more dedicated Python editors.
What is the role of a linter in a Python code editor?
A linter is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. In a Python code editor, a linter can help you write cleaner and more error-free code. It can check your code for potential errors and provide suggestions for improvements. Some editors, like PyCharm or VS Code, have built-in linting support, while others allow you to install linter as an extension or plugin.
The above is the detailed content of Which Code Editors Are Best for Python?. For more information, please follow other related articles on the PHP Chinese website!

The rise of Chinese women's tech power in the field of AI: The story behind Honor's collaboration with DeepSeek women's contribution to the field of technology is becoming increasingly significant. Data from the Ministry of Science and Technology of China shows that the number of female science and technology workers is huge and shows unique social value sensitivity in the development of AI algorithms. This article will focus on Honor mobile phones and explore the strength of the female team behind it being the first to connect to the DeepSeek big model, showing how they can promote technological progress and reshape the value coordinate system of technological development. On February 8, 2024, Honor officially launched the DeepSeek-R1 full-blood version big model, becoming the first manufacturer in the Android camp to connect to DeepSeek, arousing enthusiastic response from users. Behind this success, female team members are making product decisions, technical breakthroughs and users

DeepSeek released a technical article on Zhihu, introducing its DeepSeek-V3/R1 inference system in detail, and disclosed key financial data for the first time, which attracted industry attention. The article shows that the system's daily cost profit margin is as high as 545%, setting a new high in global AI big model profit. DeepSeek's low-cost strategy gives it an advantage in market competition. The cost of its model training is only 1%-5% of similar products, and the cost of V3 model training is only US$5.576 million, far lower than that of its competitors. Meanwhile, R1's API pricing is only 1/7 to 1/2 of OpenAIo3-mini. These data prove the commercial feasibility of the DeepSeek technology route and also establish the efficient profitability of AI models.

Midea will soon release its first air conditioner equipped with a DeepSeek big model - Midea fresh and clean air machine T6. The press conference is scheduled to be held at 1:30 pm on March 1. This air conditioner is equipped with an advanced air intelligent driving system, which can intelligently adjust parameters such as temperature, humidity and wind speed according to the environment. More importantly, it integrates the DeepSeek big model and supports more than 400,000 AI voice commands. Midea's move has caused heated discussions in the industry, and is particularly concerned about the significance of combining white goods and large models. Unlike the simple temperature settings of traditional air conditioners, Midea fresh and clean air machine T6 can understand more complex and vague instructions and intelligently adjust humidity according to the home environment, significantly improving the user experience.

Website construction is just the first step: the importance of SEO and backlinks Building a website is just the first step to converting it into a valuable marketing asset. You need to do SEO optimization to improve the visibility of your website in search engines and attract potential customers. Backlinks are the key to improving your website rankings, and it shows Google and other search engines the authority and credibility of your website. Not all backlinks are beneficial: Identify and avoid harmful links Not all backlinks are beneficial. Harmful links can harm your ranking. Excellent free backlink checking tool monitors the source of links to your website and reminds you of harmful links. In addition, you can also analyze your competitors’ link strategies and learn from them. Free backlink checking tool: Your SEO intelligence officer

DeepSeek-R1 empowers Baidu Library and Netdisk: The perfect integration of deep thinking and action has quickly integrated into many platforms in just one month. With its bold strategic layout, Baidu integrates DeepSeek as a third-party model partner and integrates it into its ecosystem, which marks a major progress in its "big model search" ecological strategy. Baidu Search and Wenxin Intelligent Intelligent Platform are the first to connect to the deep search functions of DeepSeek and Wenxin big models, providing users with a free AI search experience. At the same time, the classic slogan of "You will know when you go to Baidu", and the new version of Baidu APP also integrates the capabilities of Wenxin's big model and DeepSeek, launching "AI search" and "wide network information refinement"

AI Prompt Engineering for Code Generation: A Developer's Guide The landscape of code development is poised for a significant shift. Mastering Large Language Models (LLMs) and prompt engineering will be crucial for developers in the coming years. Th

This Go-based network vulnerability scanner efficiently identifies potential security weaknesses. It leverages Go's concurrency features for speed and includes service detection and vulnerability matching. Let's explore its capabilities and ethical


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

Notepad++7.3.1
Easy-to-use and free code editor

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.