liveBook · Manning

Spyder

As explained in Get Programming: Learn to code with Python

Spyder is an integrated development environment for scientific programming in Python.

Spyder is an integrated development environment (IDE) for writing and running Python programs. It comes with Anaconda and brings an editor, a console, and tools for inspecting a program into one window. section 3.1

The main parts of the workspace have different jobs:

  • Use the editor on the left to write a program in a file. You can keep multiple files open in separate tabs. section 3.2
  • Use the IPython console at the bottom right to try single commands and see their results. Programs can also receive input and show output there. section 3.2
  • The top-right pane can show a variable explorer, which displays variable values after a program finishes. section 3.2
Figure 3.2. The Spyder IDE with the code editor, console, and variable explorer windows

Locate the editor, console, and variable explorer before trying a command. section 3.1

Try the console

Type `3 + 2` in the IPython console and press Enter. Spyder shows `5`. Try `4 / 5` and it shows `0.8`. This is a quick way to check what an expression evaluates to. For a longer program, write code in an editor file, save it, and run it with the green arrow button. section 3.2 section 3.3

A result you inspect in the console is not necessarily output shown to someone using your program. Use a `print` statement when you want to display an expression’s value as program output. section 3.2 section 3.3

How Get Programming: Learn to code with Python covers it

How deep it goes
Walks through the workspace panes, console calculations, and file workflow without detailing Spyder internals.
Examples
Uses `3 + 2` and `4 / 5` to demonstrate console results, alongside an editor-and-console workspace illustration.
What it assumes
Introduces the IDE and console for beginners, starting with simple arithmetic rather than assuming programming experience.
What you can do after
Operate Spyder to test expressions, write and save a Python file, and run a program.
How it connects
Connects Spyder to Anaconda, Python, the IPython console, file editing, variable inspection, and print statements.

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.