I'm trying to use the pylint utility that comes along
with gadfly, and it fails to load due to regular
expression compilation of pywhiteoutre. The relevant
lines in pygram.py are:
pycommentre = r"(#.*)"
# whitespace regex outside of brackets
# white followed by (comment\n maybe repeated)
# DON'T EAT NEWLINE!!
pywhiteoutre = r"([ \t\r\014]|[\]\n)*%s?" % pycommentre
pywhiteout = re.compile(pywhiteoutre)
When I try copying this into an interactive python
Python 2.1 (#3, May 16 2001, 15:15:15)
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more
>>> import re
>>> import string
>>> pycommentre = r"(#.*)"
>>> pywhiteoutre = r"([ \t\r\014]|[\]\n)*%s?" %
>>> pywhiteout = re.compile(pywhiteoutre)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
line 90, in compile
return _compile(pattern, flags)
line 136, in _compile
raise error, v # invalid expression
sre_constants.error: unexpected end of regular
As you can see, the python version is 2.1 and not
compiled with the latest and greatest stuff (gcc
2.95.2, glib 2.2.4, etc.). Would this problem be
related to older re libraries and the slightly older
python, or perhaps has pylint/pygram fallen out of