Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code?
views:
1239answers:
4
+7
A:
You can use Pyflakes together with Flymake in order to get instant notification when your python code is valid (and avoids a few common pitfalls as well).
Glyph
2008-10-15 21:40:49
+2
A:
Or from emacs (or vim) you could run python -c 'import x'
where x is the name of your file minus the .py
extension.
mhawke
2008-10-16 00:56:03
A:
You can use pylint, pychecker, pyflakes etc. from Emacs' compile
command (M-x compile
).
Hint: bind a key (say, F5) to recompile
.
Matt Curtis
2008-10-16 06:32:48