Spyder’s multi-language Editor integrates a number of powerful tools right out of the box for an easy to use, efficient editing experience. The Editor’s key features include syntax highlighting (pygments); real-time code and style analysis (pyflakes and pycodestyle); on-demand completion, calltips and go-to-definition features (rope and jedi); a function/class browser, horizontal and vertical splitting, and much more.

Spyder's Editor panel, split horizontally and with style analysis

Outline Explorer (function/class/method browser) and horizontal/vertical splitting capabilities:

Spyder outline panel, showing the functions/classes/methods in a file A Spyder editor window, split vertically into two independent panes

Real-time code and style analysis with pyflakes and pycodestyle:

A snippit of code in the Spyder Editor, showing code style warnings

Defining code cells

A “code cell” in Spyder is a block of lines, typically in a script, that can be easily executed all at once in the current doc:ipythonconsole. This is much like a “cell” in MATLAB (except without any need to enable a “cell mode”, since in Spyder, cells are detected automatically). You can divide your scripts into as many cells as needed, or none at all—the choice is yours.

Spyder's Editor panel, showing an example of a code cell

You can separate cells by lines starting with either:

  • #%% (standard cell separator)

  • # %% (standard cell separator, when file has been edited with Eclipse)

  • # <codecell> (IPython notebook cell separator)

Providing a description to the right of the separator will give that cell its own name in the Outline Explorer.