Choosing a Text Editor for Python Programming

Female teacher helping pre-adolescent girls programming at laptops in classroom
Hero Images / Getty Images
of 03

What is a Text Editor?

To program Python, most any text editor will do. A text editor is a program that saves your files without formatting. Word processors such as MS-Word or Writer include formatting information when they save a file -- that is how the program knows to bold certain text and ​italicize others. Similarly, graphic HTML editors do not save emboldened text as bold text but as text with a bold attribute tag. These tags are meant for visualization, not for computation. Therefore, when the computer reads the text and tries to execute it, it gives up, crashing, as if to say, "How do you expect me to read that?" If you do not understand why it might do this, you may want to revisit how a computer reads a program.

The main point of difference between a text editor and other applications that allow you to edit text is that a text editor does not save formatting. So, it is possible to find a text editor with thousands of features, just like a word processor. The defining characteristic is that it saves the text as simple, plain text.

of 03

Some Criteria for Choosing a Text Editor

For programming Python, there are literally scores of editors from which to choose. While Python comes with its own editor, IDLE, you are by no means restricted to using it. Every editor will have its plusses and minusses. When evaluating which one you would use, a few points are important to keep in mind:

  1. The operating system you will be using. Do you work on Mac? Linux or Unix? Windows? The first criterion by which you should judge the suitability of an editor is whether it works on the platform you use. Some editors are platform-independent (they work on more than one operating system), but most are restricted to one. On Mac, the most popular text editor is BBEdit (of which TextWrangler is a free version). Every Windows installation comes with Notepad, but some excellent replacements to consider are Notepad2, Notepad++, and TextPad. On Linux/Unix, many opt for using GEdit or Kate, although others opt for JOE or another editor.
  2. Do you want a barebones editor or something with more features? Typically, the more features an editor has, the harder it is to learn. However, once you learn them, those features often pay handsome dividends. Some relatively barebones editors are mentioned above. On the feature-full side of things, two multi-platform editors tend to go head-to-head: vi and Emacs. The latter is known to have a near-vertical learning curve, but pays off abundantly once one learns it (full disclosure: I am an avid Emacs user and am, indeed, writing this article with Emacs).
  3. Any networking capabilities? In addition to desktop features, some editors can be made to retrieve files over a network. Some, like Emacs, even offer the ability to edit remote files in real time, without FTP, over a secure login.
of 03

Recommended Text Editors

Which editor you choose depends on how much experience you have with computers, what you need it to do, and on which platform you need to do it. If you are new to text editors, I here offer some suggestions on which editor you might find most useful for the tutorials on this site:

  • Windows: TextPad offers a straightforward user experience with a few features to help you along. Some software companies use TextPad as the standard editor for programming interpreted languages.
  • Mac: BBEdit is the most popular editor for the Mac. It is known for offering a bevy of features but otherwise staying out of the user's way.
  • Linux/Unix: GEdit or Kate offer the most straightforward user experience and are comparable to TextPad.
  • Platform Independent: Naturally, the Python distribution comes with a perfectly good editor in IDLE, and it runs everywhere Python does. Other user-friendly editors of note are Dr Python and Eric 3. Naturally, one should never forget about vi and Emacs.
mla apa chicago
Your Citation
Lukaszewski, Al. "Choosing a Text Editor for Python Programming." ThoughtCo, Aug. 27, 2020, Lukaszewski, Al. (2020, August 27). Choosing a Text Editor for Python Programming. Retrieved from Lukaszewski, Al. "Choosing a Text Editor for Python Programming." ThoughtCo. (accessed June 9, 2023).