I’m starting a new project using python, so I installed pylint via macports for some code checking. Using Textmate for all my coding, I wanted a neat little shortcut for executing pylint on a given file.
Textmate is really cool and allows already for validating your source code with pyCheckMate, which is based on pychecker with ctrl+shift+v. Another useful command in Textmate’s python bundle is running the script with pyMate (cmd+r). There are also various bundles for other languages, which make your life easy such as creating a XML file. I mostly use it for python and LaTeX, for both of which it is very convenient.
As I really like these shortcuts I created one for pylint, see the figure below for details. Note that it links to my /opt/local/ installation of pylint, which is the standard macports install path.
You can configure your call to pylint, e.g. I disabled some style checks (See pylint –help). My suggestion is to print with the html output format, which works really nice with the TextMate output viewer.
Textmate allows for very convenient formulation of calls on files with built-in variables. As this was so easy and very handy, I’m going to look for more cool features in its documentation .
Leave a Reply
You must be logged in to post a comment.