--- On Mon, 1/31/11, Alan Gauld <alan.ga...@btinternet.com> wrote: > From: Alan Gauld <alan.ga...@btinternet.com> > Subject: Re: [Tutor] search list with regex > To: tutor@python.org > Date: Monday, January 31, 2011, 3:29 PM > > "Elwin Estle" <chrysalis_reb...@yahoo.com> > 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 - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor