--- On Mon, 1/31/11, Alan Gauld <[email protected]> wrote:

> From: Alan Gauld <[email protected]>
> Subject: Re: [Tutor] search list with regex
> To: [email protected]
> Date: Monday, January 31, 2011, 3:29 PM
> 
> "Elwin Estle" <[email protected]>
> wrote
> 
> > parse various text files and my standard method is to
> > slurp the whole thing up into a string variable, then
> > break it up into a list that I can then work on
> 
> If you read it with readlines() Python will do all of
> that for you...
> 

Yeah, I should probably give that a try.  It was so abysmally slow to do it 
that way in Tcl that I didn't even think to try it in python.  However, with 
the vcards, it is perhaps easier to do it the "big string" way, since each 
vcard is of varying length, but they all start with "BEGIN:VCARD", and end with 
"END:VCARD".  I can just load the whole works and have it split into individual 
vcards using that information for the split.


      
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to