pygments not working with Python3
I am attempting to port a plugin that uses pygments from Python2 to Python3 and I am running into several issues in the pygments source. There are several syntax errors that appear to be related to Python 3 changes that have not been updated in pygments.
Does Python3 support require something like 2to3?
A couple of examples:
File "/home/user/src/pygments/__init__.py", line 46 except TypeError, err:
From what I can tell, this should be:
except TypeError as err:
in pygments/lexers/_mapping.py:322 The print statement is missing parens.
These issues occur in multiple places and are easy enough to fix. However, now I'm getting a syntax error in latex.py:309 that I assume has something to do with changes to the behavior of backslashes in literal strings.
I am sure others are using Python 3. Is there something special I need to do before importing pygments?