Python IDE – which code editor to choose?

by Alex
Python IDE - which code editor to choose?

Writing Python code using IDLE or Python Shell is fine for simple operations, but these tools bring frustration and desperation when working on large projects. Using an IDE or code editor makes development fun, but which one is best for you? This article will help clarify which option among the available ones is more suitable. You will also see the pros and cons of each, which will help you make an informed decision. To keep it simple, let’s divide our list into two categories of tools: those created exclusively for Python development and those created for general development, but which can be used to work with Python. Let’s define the pros and cons for each. But first..

What are IDEs and code editors

An IDE (or integrated development environment) is a program designed for software development. As the name implies, an IDE includes tools specifically designed for software development. By default, the tools contain :

  • An editor dedicated to code processing (e.g., with syntax highlighting and autocompletion).
  • Build, run and debug tools.
  • Version control system.

Most IDEs support many programming languages and contain other additional features. Therefore, they take a long time to download and install.

Python development environment requirements

So, what you need to know about the programming environment. Feature lists vary from application to application, but there is a basic set of features that simplifies development:

  • Save and reload files An IDE or editor will allow you to save your work and open it later, in the same state it was in before closing it.
  • Run the code in the programming environment Using the IDE, running Python code will be no more difficult than running it from a simple text editor.
  • Debugging Support The ability to test your code in time before launching it is a feature of all IDEs and other code editors.
  • Syntax highlighting Identification of keywords, variables and symbols in code makes code reading and understanding much easier.
  • Automatic code formatting Any editor or IDE will recognize a colon at the end of a for or while.

There are many other functions: source code management, an extension model, build and test tools, help with language syntax, and others. But the above list is the basic features that a good editing environment supports. With these features in mind, let’s take a look at some of the general-purpose tools that Python uses for development.

Development Environment / IDEs that support Python

Eclipse + PyDev

Category: IDE Web site: www.eclipse.org Python tools: PyDev, www.pydev.org If you’ve been interested in open source software, you’ve probably heard of Eclipse. Available for Linux, Windows, and OS X, Eclipse is the de facto open source software for Java development. Many extensions and add-ons have been created for it, making Eclipse useful in most areas of development. One of them is PyDev, which allows you to debug Python programs, autocomplete code, and use the interactive Python console. Installing PyDev in Eclipse is simple: from Eclipse, choose “Help”, “Eclipse Marketplace”, then look for PyDev. Click “Install” and restart Eclipse if necessary. Eclipse with PyDev installed Pros: If you already have Eclipse installed, adding PyDev will be faster and easier. PyDev is easy for an experienced Eclipse developer. Cons: If you are new to Python or to software development, Eclipse will seem complicated. It was mentioned above that IDEs require a lot of knowledge to use correctly. Eclipse is a baggage of knowledge, with a bag of microprocessors to boot.

Sublime Text

Category: Code Editor Web site: https://www.sublimetext.com Sublime Text, written by a Google engineer in pursuit of the dream of a better text editor, is an extremely popular code editor. Sublime Text, supported on all platforms, has built-in support for Python code editing and a rich set of extensions (called packages) with which to extend syntax and editing capabilities. Installing additional Python packages will seem complicated: Sublime Text packages are written in Python, and installing the editor often requires running Python scripts directly in Sublime Text. редактор кода Sublime Text Pros: Sublime Text is popular in the development community. As a code editor, Sublime Text is fast, lightweight and well supported. Cons: Sublime Text is not free, although you can use the evaluation version indefinitely. Installing extensions requires effort and there is no direct support for executing or debugging code from the editor is a minus.

Atom

Category: Code Editor Web site: https://atom.io/ Available on all platforms, Atom is considered to be the “hacker text editor of the 21st century”. A sophisticated interface, file system operations, and extension store. The free-to-access Atom is built using Electron, a framework for building computer applications using JavaScript, HTML and CSS. Support for the Python language is provided by an extension that can be installed when you start Atom. Atom — редактор кода Pros: Supported on all platforms thanks to Electron. Atom is small and fast to load. Cons: Code handling and debugging support is not built in, but there are add-ons to the editor. Because Atom is built on Electron, it runs as a JavaScript process, not an application.

GNU Emacs

Category: Code Editor Web site: https://www.gnu.org/software/emacs/ Before the iPhone and Android war, long before the Linux vs. Windows war, and even before the PC vs. Mac war, there was a War of the Editors and GNU Emacs was involved. Presented as “a scalable, customizable, self-documenting, real-time display editor,” GNU Emacs has been around almost as long as UNIX. Always free and available on every platform (in one form or another), GNU Emacs uses a form of the powerful Lisp programming language for customization. GNU Emacs editor Pros: You are familiar with Emacs, you use Emacs, you like working with Emacs. Lisp is a second language, and you know the power it provides for great accomplishments. Cons: Customization means writing (or copying) Lisp code into script files. You may have to learn Lisp to figure out how to do this.

Vi / Vim

Category: Code Editor Web site: https://www.vim.org/ On the other side of the text editor wars stands VI (or VIM). It is included by default in almost every UNIX system and Mac OS X. VI has just as many followers. VI and VIM are modal editors that separate file browsing from file editing. VIM is an enhanced copy of the original VI, including a scaling model and in-situ code creation. VIMScripts are suitable for a variety of Python development tasks. VIM text editor Pros: You know all about VI, you actively use VI, you like working with VI. VIMScripts doesn’t scare you and you know how to make it do what you need it to do. Cons: As with Emacs, it may not be convenient to find or write your own scripts to work with Python and keep the editor running.

Visual Studio

Category: IDE Web site: https://www.visualstudio.com/vs/ Python Tools: Python Tools for Visual Studio, PTVS Visual Studio is a full-featured IDE that is similar to Eclipse in many ways. Built exclusively for Windows and Mac OS, VS comes with both free (Community) and paid (Professional and Enterprise) versions. Visual Studio allows you to develop for different platforms and comes with its own extension store. Python Tools for Visual Studio (PTVS) allows you to program in Python in Visual Studio, and Intellisense for Python, to debug. Pros: If you already have Visual Studio installed for other development, adding PTVS is faster and easier. Cons: Visual Studio is heavy to use for Python alone. Also, there is no Visual Studio installation for Linux.

Visual Studio Code

Category: Code Editor Web site: https://code.visualstudio.com/ Python tools: https://marketplace.visualstudio.com/items?itemName=ms-python.python Not to be confused with Visual Studio, Visual Studio Code (VS Code) is a full-featured code editor available for Linux, Mac OS X and Windows platforms. Small and lightweight, but full-featured, VS-Code is open-source, scalable, and customizable for most tasks. Like Atom, VS Code is built on Electron, so it has the same advantages and disadvantages. Installing Python support in VS Code is easy and affordable. Look for Python in the add-on store, click Install, and restart if necessary. VS Code will automatically see the installation and the Python libraries. Visual Studio Code editor Pros: Thanks to Electron, VS Code is available on every platform, full-featured despite its small size and open source. Cons: Electron means that VS Code is not a separate application. Also, some people’s principle is not to use Microsoft products.

Specialized editors and IDEs for Python

PyCharm

Category: IDE Web site: https://www.jetbrains.com/pycharm/ One of the best (and only) full-featured dedicated IDEs for Python is PyCharm. Available in both paid (Professional) and free open-source (Community) versions, PyCharm is quick and easy to install on Windows, Mac OS X and Linux platforms. On that basis, PyCharm supports Python development directly. Simply open a new file and write the code. Run and debug Python code directly inside PyCharm. Plus it supports version and project management. PyCharm IDE для Python Pros: It is the de facto Python IDE environment, with a ton of support in general and community support. Edits, runs, and debugs Python out of the box. Cons: PyCharm can be slow to load, and the default settings need tweaking for existing projects.

Spyder

Category: IDE Web site: https://github.com/spyder-ide/spyder Spyder is an open-source Python IDE optimized for the data analysis domain. Spyder comes with the Anaconda package manager distribution, so it depends on the settings already installed. What’s interesting about Spyder is that the target audience is data analysts using Python. For example, Spyder integrates with Python data analysis libraries such as SciPy, NumPy, and Matplotlib. Spyder offers many “simple IDE features” that will come in handy, such as a code editor with robust syntax highlighting, autocomplete Python code, and there is even a built-in browser with documentation. A feature not found in other Python editors is Spyder’s “variable explorer,” which displays data using a table layout inside the development environment. If you are learning data analysis using Python, you will fall in love with this unique feature. Good integration with IPython, Jupyter. Spyder is more specific than other IDEs. A special purpose tool, but not something to use as your primary programming environment every day. What’s nice about this Python development environment is that it’s available for free for Windows, MacOS, and Linux. Spyder Python IDE Screenshot Pros: For those who do data analysis using the Anaconda Python distribution. Cons: Experienced Python developers find Spyder too simple for everyday work and choose a scalable IDE or custom editor solution.

Thonny

Category: IDE Web site: https://thonny.org/ A recent addition to the Python family of IDEs. Thonny is considered an IDE for beginners. Written and maintained by the Institute of Computer Science at the University of Tartu in Estonia, Thonny is available for all major platforms with installation instructions on the website. By default, Thonny is installed already with Python, so there is no need to install anything extra. Thonny IDE для начинающих Pros: Easy for novice Python users who want an IDE that is ready to go. Cons: For more experienced Python developers, Thonny will be small for most projects. Also, being a new tool, it can produce bugs that are hard to fix.

Which Python IDE is right for you?

Only you can make that decision, but here are the basic recommendations:

  • Beginning Python developers should try solutions with minimal settings. The less interference the better.
  • If you use text editors for other tasks (like web pages or documentation), look out for full-fledged code editors.
  • If you’re already developing other software, it’s easier to add Python to your existing toolkit.

Related Posts

LEAVE A COMMENT