Over a million developers have joined DZone.
Platinum Partner

Tools for Better Python

· Web Dev Zone

The Web Dev Zone is brought to you in partnership with Mendix.  Discover how IT departments looking for ways to keep up with demand for business apps has caused a new breed of developers to surface - the Rapid Application Developer.

pip install virtualenv pylint ipython autohook

Tools I use every day to write better Python, to make it more fun, or just easier:

  • A good editor: I prefer Emacs, you might like something else, but trust me on this - it’ll be a humongous project that forces you to use a full IDE. If you stay clear of large web frameworks, you might never need it. I started out using PyDev since I was used to Eclipse, but now I just don’t think its worth the complexity and overhead.
  • virtualenv: I use my virtualenvs for more than just Python these days, and setting a new environment up is the first thing I do when starting a new project.
  • pylint: Not only does it tell you what you might want to fix in your code, it tells you if your code gets better or worse. The more unsure you are, the more you should use pylint.
  • ipython: While REPL is nice, iPython is truly awesome for testing and prototyping. For me, its gradually replacing bash as well.
  • unittest/unittest2: Python comes with built-in unit test support - use it (where appropriate)!

These are the tools I use in almost any project, and recently I’ve added one of my own:

  • autohook, to run pylint/unit tests on commit to Mercurial

Finally, I’d like to point anyone starting out with Python to the excellent introduction set up by Mir Nazim at his site.


Source: http://blaag.haard.se/Tools-for-better-Python/

The Web Dev Zone is brought to you in partnership with Mendix.  Learn more about The Essentials of Digital Innovation and how it needs to be at the heart of every organization.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}