Mac Python Editors

You want a good editor when programming in Python, in particular if you are going to work on larger and more involved projects. But, there are so many options to choose from, so what do you choose, and how do you know if you want an editor or an IDE?

In this post I give my thoughts on three Mac code editors or IDEs that I currently use:

Sublime Text

Sublime Text, or just Sublime, is cross-platform editor that is best characterised by the word fast, but also that it is very configurable and consumes only limited system resources (memory and CPU).

Sublime is sold as a commercial product, but it is very well-priced and provides much value for the cost. Years ago, I paid some small amount for a Sublime 2 license, and (amazingly) all upgrades have been free, even the upgrade from Sublime 2 to the much improved Sublime 3.

Sublime has many good text editing features built-in, and there is a large eco-system of developers writing plugins that augment the editor in various ways to make it even better.

What I like about Sublime:

I use Sublime for most of my Python coding, and most other text editing. I like it mostly because of the pure focus on just being great at editing and manipulating text. What I really miss in Sublime is an interactive debugger (the one that exist seems to be unmaintained).

Visual Studio Code

Microsoft's Visual Studio Code, or just Code, is their take on the category of cross-platform editors that are in-between a pure text editor and a full fledged IDE. Code is fully open source free software, which in itself is a remarkable feature for a product coming from Microsoft.

Code appears fast and not too resource intensive, which is impressive as it is actually written in typescript/javascript and runs on the Electron framework. Though, in my experience, it happens sometimes that the resource (memory and CPU) usage grow drastically when using Code. However, it seems as it is much less likely to happen now than with the earlier versions of the product.

There is huge eco-system of developers contributing to Code itself and writing plugins, of which there are many thousands. Installing a lot of plugins will definitely lead to bloat and huge use of resources, so I tend to be very careful with that.

What I like about Code:

What I don't like about Code:

I haven't used Code a whole lot, mostly for the above reasons, but I think it is great tool to have, and I particularly enjoy using the more advanced features of the Python plugin, such as autocomplete and debugger.

PyCharm

PyCharm is a full fledged IDE for Python, with all the features you would expect from an IDE, such as autocomplete, debugger, testrunner, code refactoring, and good documented support for a lot of the popular frameworks and application areas. PyCharm has a free Community Edition that I use, and also various paid options that include more features.

PyCharm is written in Java, and it uses a Java based UI library, which have a look-and-feel that is quite different from that of native macOS applications.

Creating a project in PyCharm is an involved process, just as it is the case for all other IDEs I have used. There is no easy way to just point to folder and make that a PyCharm project (or, if there are, I have missed it).

What I like about PyCharm:

I pretty much only use PyCharm when I have a need for debugging a complex Python project, but for that it is great.

Other notable Mac text editors

I assume that there are many more Mac editors than I know about, but here are some alternatives to those I listed above:

There are also the terminal editors, such as Nano, Vim and Emacs, which are all popular choices.