]> git.phdru.name Git - dotfiles.git/blobdiff - bin/compyle4vim.py
bin/cleanup-filenames.sh: Remove accents
[dotfiles.git] / bin / compyle4vim.py
index 8b5c78b7546cc2c73eee7fb38c95584e16e66d18..08f93244ec2735d170a937a6f3ddf98f1390e07d 100755 (executable)
@@ -1,5 +1,4 @@
-#! /usr/bin/env python
-
+#! /usr/bin/env python3
 
 import sys, os
 
@@ -17,12 +16,15 @@ try:
       template.compile()
    else:
       compile(codestring, filename, "exec")
-except SyntaxError, detail:
-   pass
+except SyntaxError as detail:
+   msg = str(detail)
+   filename = detail.filename
+   lineno = detail.lineno
+   offset = detail.offset
+   lineno = detail.lineno
 else:
    sys.exit()
 
-msg, (_fname, lineno, offset, line) = detail
 if offset is None: offset = 1
 
 sys.stderr.write("""  File "%s", line %d, column %d