liveBook · Manning

Text editor

As explained in Get Programming: Learn to code with Python

A text editor is software for creating and modifying text files, including plain-text documents and source code.

A text editor creates and modifies text-based files. In Spyder, the file editor is the pane where you write Python programs, save them, and run them; the console is better for quickly testing individual commands. section 3.2 section 3.3

A simple editor workflow is:

  • Open a new file in the editor. section 3.3
  • Write a program in the file rather than entering each command separately in the console. section 3.2
  • Save the file, then run the program and inspect its output in the console. section 3.3
  • Open several files at once; each file appears in its own editor tab. section 3.2

Editor and console together

Use the IPython console to try a small expression such as 3 + 2 and see its result immediately. Put a longer program in the file editor, save it, run it with the green arrow, and use the console to view printed output or inspect values. section 3.2 section 3.3

Figure 3.3. Spyder session after entering expressions in the IPython console and the code editor

View the Spyder workspace with expressions in the IPython console and code in the editor. section 3.2

How Get Programming: Learn to code with Python covers it

How deep it goes
Explains the editor’s workspace role and basic workflow but stops short of implementation details about editors or file formats.
Examples
Uses 3 + 2 and 4 / 5 for console tests, saved programs for editor practice, and multiple tabs for managing files.
What it assumes
Starts from workspace setup and basic commands, assuming no advanced programming knowledge.
What you can do after
Operate/configure it through Spyder by opening files, writing programs, saving them, running them, and viewing results.
How it connects
Connects the text editor with Spyder, the IPython console, Python programs, variables, and print statements.

Also explained in

Compare how 2 books explain text editor →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Get Programming: Learn to code with Python. The section links point to the parts of the book it draws on.