Python Development Tools

I’ve been learning Python for the past few months, and have gone through a few iterations of development tools.  I’d like to share my experiences.  I’m using a Windows 7 development environment, and the Python 3 branch.

My first installation was from WinPython, because I was looking for the simplest way to get going without having to set environment paths, etc, as one often must with open source software.

I liked this environment.  It was easy to install, and the Spyder IDE and Qt Designer GUI platform with Python support were included.  It was easy to enter scripts into the console and experiment.  Spyder has nice context sensitivity with text coloring, dynamic code introspection, and its errors and warnings on the fly helped a lot with beginner’s development.  It also has a decent debugger based on pdb.

When I wanted to upgrade to the latest Python version, however, I couldn’t figure out how to do it.  WinPython is good for installing everything in one package for you, but it wasn’t clear to me how to get Spyder to use a different version of Python (and I did dig hard).

I started looking around at other options, since I hadn’t done much of a survey to begin with.  I tried IronPython, a Python implementation which links to Microsoft .NET, since I liked the Visual Studio (VS) design environment last time I used it.  IronPython required an add-in to VS, which was free from Microsoft.  I soon found that I needed to create an entire VS project to be able to run or debug scripts, which was a little annoying.  I also found that I missed the pyflakes– based real-time error checking of Spyder, and the fusing of Python with VS seemed a little incomplete.

Then I found what seems to be the perfect Python development environment.  I downloaded and installed the official Python with push-button installation for Windows, found an incredible list of pre-compiled extension packages for Windows maintained by Christoph Gohlke, and a gorgeous tailored Python IDE from PyCharm.  They have a Community Edition which is free, so all of this fabulous software is available at no charge.  I don’t know about you, but that kind of thing makes me want to send in a contribution.

I can’t say enough good things about PyCharm.  It is fully Python-aware with text coloring, method and attribute prompting as you type, and considerably better real-time notification than Spyder (including prompts and automatic reformatting to help your source code adhere to the PEP 8 Python Style Guide).  It also has a terrific full-featured debugger which transparently puts breakpoints even in callback functions (which Spyder doesn’t do) and gives you complete, professional-level visibility into your code as you step through it.  I’ve barely scratched the surface of its capabilities, but have worked with it enough to see how smooth, elegant, and powerful it is, and how it boosts productivity and results in better code.

So give this a try.  In this order:  install Python from here, install a few of the basic packages like numpy and matplotlib from here (and more as you need them), and PyCharm from here, and you will be up and running.  The later installations are aware of the earlier (at least they were here), and there was no configuration or linking required as they installed.  Pay attention to one thing: be sure the bit width (32 or 64) is the same between your Python and package installations.  The rest is duck soup.

(I just found that JetBrains has a free PyCharm Educational Edition which includes interactive tutorials.  It is fully self-contained, and would be perfect for beginners or those with little programming experience.)