liveBook · Manning

IPython

As explained in Get Programming: Learn to code with Python

The IPython console is an interactive command-line shell for executing Python code and displaying results.

IPython is an interactive command-line shell for quickly running Python commands and viewing their results. In Spyder, it appears in the bottom-right pane and supports experimentation, testing, and interaction with programs. section 3.2

Use the console to:

  • Try single commands and build intuition about statements and expressions. section 3.2
  • Use autocompletion, command history, and color highlighting while working. section 3.2
  • Test and debug programs by entering commands and inspecting their output. section 3.2

Peek at expression results

Enter 3 + 2 and press Enter to see Out[] 5. Enter 4 / 5 to see Out[] 0.8. Each result provides a quick look at what the expression evaluates to. section 3.2

Figure 3.4. Programmers use the console for their own testing and debugging. They type commands directly in the console and look at the output. Users interact with a program via the console. They type input to a program and view the output from a program in the console.

Compare how programmers test commands in the console with how users provide input to programs and view their output. section 3.2

How Get Programming: Learn to code with Python covers it

How deep it goes
Explains the console’s purpose, features, workspace location, and basic arithmetic, without developing advanced command use.
Examples
Demonstrates 3 + 2 and 4 / 5 entered directly into the console.
What it assumes
Assumes no prior programming experience and begins with single Python commands and simple expressions.
What you can do after
Operate IPython by entering commands, reading results, and using the console for quick testing.
How it connects
Links IPython to Python expressions, Spyder, the code editor, program interaction, and debugging.

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.