aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.vim/autoload/neomake/makers/ft/python/compile.py
blob: d2116732d505c69d43341052e4122cb2a53f39dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python

from __future__ import print_function
from sys import argv, exit


if len(argv) != 2:
    exit(64)

try:
    compile(open(argv[1]).read(), argv[1], 'exec', 0, 1)
except SyntaxError as err:
    print('%s:%s:%s: %s' % (err.filename, err.lineno, err.offset, err.msg))
    exit(1)