Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Tools for Better Python

DZone's Guide to

Tools for Better Python

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

TL;DR
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/

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}