Sunday, January 20, 2008

auto python checking with emacs

there's a description of how to use pyflakes with emacs flymode here: http://www.plope.com/Members/chrism/flymake-mode. apparently pyflakes works by walking the ast rather than executing the code, so it's fast and has no side effects. there are also some neat customizations in the comments at the bottom. pychecker can execute the code, so i might be able to set things up to autorun my doctests. according to the emacswiki, there's a way to plug pylint into the default python mode (look at the bottom of the page.) looks like it's not too hard to customize, too, so maybe i could get my doctest-running script in there. EDIT: auto-compile looks like the kind of hook i want -- it runs 'make' automatically when a file is saved. i would need to modify it, though...

No comments: