Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#20 pylint fails to load on re compilation

closed
nobody
None
5
2003-02-11
2002-12-16
Anonymous
No

Hi,

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
session:

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
information.
>>> import re
>>> import string
>>> pycommentre = r"(#.*)"
>>> pywhiteoutre = r"([ \t\r\014]|[\]\n)*%s?" %
pycommentre
>>> pywhiteout = re.compile(pywhiteoutre)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/fnal/ups/prd/python/v2_1/Linux-2-4/lib/python2.1/sre.py",
line 90, in compile
return _compile(pattern, flags)
File
"/fnal/ups/prd/python/v2_1/Linux-2-4/lib/python2.1/sre.py",
line 136, in _compile
raise error, v # invalid expression
sre_constants.error: unexpected end of regular
expression
>>>

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
date?

Thanks

Jeff Tseng
jtseng@fnal.gov

Discussion

  • Stuart Bishop
    Stuart Bishop
    2003-02-11

    Logged In: YES
    user_id=46639

    The version in CVS now loads correctly. I have no idea if
    the code actually does what it is supposed to (or if it ever
    did for that matter).

     
  • Stuart Bishop
    Stuart Bishop
    2003-02-11

    • status: open --> closed