python.vim : python compiler script
| script karma
Downloaded by 3040
Comments, bugs, improvements
script versions (upload new version)
|a very basic python compiler script. The last line of errorformat
is meant to suppress all further error messages after the traceback has been dealt with so that it will be possible to use :clast to go to the last error location which in most cases in Python is the one that has caused the error to happen.
Please note that if python is not in the path you have to edit the line
so that it contains the path of the python interpreter (e.g. c:\python22\python).
Also, if you want always to make the current file you may wish to add a
to the same line, so that:
should then look like:
setlocal makeprg=python\ %
(Thanks to Guy Oliver for this tip).
If you want to syntaxcheck the current python file without executing it, you could use the following function (from python_box.vim):
let curfile = bufname("%")
exec ":make " . "-c " . "\"import py_compile; py_compile.compile(r'" . bufname("%") . "')\""
|just add to the compiler plugin directory|
Click on the package to download.
ip used for rating: 22.214.171.124