On Jun 20, 3:35 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jun 20, 6:01 am, TYR <[EMAIL PROTECTED]> wrote:
Thank you very much. This pyparsing module looks damned useful.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 20, 6:01 am, TYR <[EMAIL PROTECTED]> wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','
On Jun 20, 10:33 pm, TYR <[EMAIL PROTECTED]> wrote:
> >How do you propose to parse that string into a "set of values"? Can
> >you rely there being data commas only in the 5th field, or do you need
> >a general solution? What if (as Peter remarked) there is a ';' in the
> >data? What if there's a "
>How do you propose to parse that string into a "set of values"? Can
>you rely there being data commas only in the 5th field, or do you need
>a general solution? What if (as Peter remarked) there is a ';' in the
>data? What if there's a "'" in the data (think O'Hare)?
My plan was to be pointlessl
On Jun 20, 9:01 pm, TYR <[EMAIL PROTECTED]> wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','
TYR wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
> Tahiti','Anaa';'AAB','AU',-
TYR wrote:
> OK, this ought to be simple. I'm parsing a large text file (originally
> a database dump) in order to process the contents back into a SQLite3
> database. The data looks like this:
>
> 'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
> Tahiti','Anaa';'AAB','AU',-
OK, this ought to be simple. I'm parsing a large text file (originally
a database dump) in order to process the contents back into a SQLite3
database. The data looks like this:
'AAA','PF',-17.4167,-145.5,'Anaa, French Polynesia','Pacific/
Tahiti','Anaa';'AAB','AU',-26.75,141,'Arrabury, Que
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
"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
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)
-
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
12 matches
Mail list logo