Do a Simple Python Error Check (with pyflakes) Every Time You Save in Textmate
The other day I was experimenting with pyflakes and because it was quite fast (though not comprehensive), I decided to add a little hook as a Textmate command to do a pyflakes validation every time I saved a python file.
As you can see in the example pictured, pyflakes catches simple things like missing imports, unused imports, and undefined local variables.
Although there is already a python bundle for Textmate to Validate Syntax (PyCheckMate), I found the HTML output in a separate window a little to disruptive to be used on every save, so I just use pyCheckMate occasionally as needed.
To use set this up, first do:
sudo easy_install pyflakes
Then, download and install this Textmate Command: Validate Syntax with pyflakes on Save Textmate Command.
Related posts:
- Install Python Enabled Vim on OS X
- How to Run External Commands Without Leaving Vim
- URL Escape Strings in Google Spreadsheets with a Simple Script
- How To Suppress DeprecationWarning in Python
- Reading About Twitter Scaling and Some Other Interesting Stuff
About this entry
You’re currently reading “Do a Simple Python Error Check (with pyflakes) Every Time You Save in Textmate,” an entry on experiments and essays
- Published:
- 11.21.09 / 7pm
- Category:
- command line, text editing


View Comments
Jump to comment form | comments rss [?]