Re: [Tutor] strings & splitting

2006-01-25 Thread Kent Johnson
Liam Clarke wrote: > Hi, > > Thanks Kent, I'll check out the CSV module. I had a go with Pyparsing > awhile ago, and it's clocking in at the 3 minute mark also. > > Alan - the data is of the form - > > a = { > b = 1 > c = 2 > d = { e = { f = 4 g = "Ultimate Showdown of Ultimate Destiny" } h =

Re: [Tutor] strings & splitting

2006-01-25 Thread Alan Gauld
Liam wrote: Alan - the data is of the form - a = { b = 1 c = 2 d = { e = { f = 4 g = "Ultimate Showdown of Ultimate Destiny" } h = { i j k } } } Everything is whitespace delimited. I'd like to turn it into ["a", "=", "{", "b", "=", "1", "c", "=", "2", "d", "=", "{",

Re: [Tutor] strings & splitting

2006-01-25 Thread Liam Clarke
6, Alan Gauld <[EMAIL PROTECTED]> wrote: > Hi Liam, > > I'm not sure I really understand what you are trying > to get to here. > > Can you provide a short sample of before/after data > so we can see what we are trying to achieve? > > Alan G > > - Or

Re: [Tutor] strings & splitting

2006-01-25 Thread Alan Gauld
on Tutor" Sent: Wednesday, January 25, 2006 1:18 PM Subject: [Tutor] strings & splitting Hi all, I have a large string which I'm attempting to manipulate, which I find very convenient to call large_string.split(" ") on to conveniently tokenise. Except, however for the dou

Re: [Tutor] strings & splitting

2006-01-25 Thread Kent Johnson
Liam Clarke wrote: > Hi all, > > I have a large string which I'm attempting to manipulate, which I find > very convenient to call > large_string.split(" ") on to conveniently tokenise. > > Except, however for the double quoted strings within my string, which > contain spaces. > > At the moment I

[Tutor] strings & splitting

2006-01-25 Thread Liam Clarke
Hi all, I have a large string which I'm attempting to manipulate, which I find very convenient to call large_string.split(" ") on to conveniently tokenise. Except, however for the double quoted strings within my string, which contain spaces. At the moment I'm doing a split by \n, and then loopin