Spyder 4 ... the python IDE for science

4024
6
12-12-2019 05:00 AM
Labels (1)
DanPatterson_Retired
MVP Esteemed Contributor
5 6 4,024

Spyder

Details as I go.  Everything is there to assist you from initial project thought to final application.

Right now... just the pics and a few tips.

An attachment of the first image, as well, if you want to explore in more detail.

Version

Spyder 4's current version and changelog can be tracked at...

Spyder changelog on GitHub 

Theme choices

There are a variety of ways to layout and style the IDE.  A full dark theme is shown to the right .

Or you can split the themes and have different ones for  the editor and console.  The image below shows a lighter theme for the Variable explorer and the file explorer.

Separate (floating) or in-pane graphics available using direct access to Matplotlib.

Preference options

Graphics options

There is a new Plots window, or you can set your graphics to automatic to get a separate matplotlib graph window.  From there you can interactively alter the graphic to suit your needs.

You will also note, that svg inline graphics are supported.  I wrote a function to display numpy arrays representing geometry objects to get a quick preview without the need to create a featureclass.

File/project and script navigation

Help documentation and presentation

Help is everywhere. 

The example to the right shows what a function docstring looks link in the console and in the help tab. 

You can choose between coding styles within the preferences.

The numpydoc style used by packages like scipy, matplotlib, pandas to name a few, is shown below for comparison.

Editing tips

 

I hate scrolling, so when you get an error, click on the line number.  If it is in an imported script, you can even click on the script name to go there.


The object explorer can be used to retrieve information for objects.  This is useful for documentation purposes.

Finding stuff


When your package gets large and you are trying to locate something... Find is your friend.

A quick click and you are there to make edits, copy or just read.

Kite can be installed as well

Kite - AI Autocomplete and Docs for Python 

6 Comments
About the Author
Retired Geomatics Instructor at Carleton University. I am a forum MVP and Moderator. Current interests focus on python-based integration in GIS. See... Py... blog, my GeoNet blog...
Labels