Re: Strange re problem on OSX but Not Linux

2006-11-08 Thread Brian
Paul McGuire wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Dont use regex as a name. Also, do you have any script called "re.py" > > hidding that library module? or regex.py? > > My bet is that a local re.py is masking the lib module. (It's a shame

Re: Strange re problem on OSX but Not Linux

2006-11-08 Thread Paul McGuire
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dont use regex as a name. Also, do you have any script called "re.py" > hidding that library module? or regex.py? My bet is that a local re.py is masking the lib module. (It's a shame this error is so easy to tri

Re: Strange re problem on OSX but Not Linux

2006-11-08 Thread Gabriel Genellina
At Wednesday 8/11/2006 15:01, Brian wrote: I have a very small script: import re text = open('eq.txt','r').read() regex = '[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]' pattern = re.compile(regex) match = pattern.findall(text) print ''.join(match) -

Strange re problem on OSX but Not Linux

2006-11-08 Thread Brian
I have a very small script: import re text = open('eq.txt','r').read() regex = '[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]' pattern = re.compile(regex) match = pattern.findall(text) print ''.join(match) However, when I try to run it, I get this error: Traceback (most recent call last): File "/Appli