Re: How to efficiently extract information from structured text file

2010-02-18 Thread Paul McGuire
On Feb 17, 7:38 pm, Steven D'Aprano wrote: > On Wed, 17 Feb 2010 17:13:23 -0800, Jonathan Gardner wrote: > > And once you realize that every program is really a compiler, then you > > have truly mastered the Zen of Programming in Any Programming Language > > That Will Ever Exist. > > In the same w

Re: How to efficiently extract information from structured text file

2010-02-17 Thread Steven D'Aprano
On Wed, 17 Feb 2010 17:13:23 -0800, Jonathan Gardner wrote: > And once you realize that every program is really a compiler, then you > have truly mastered the Zen of Programming in Any Programming Language > That Will Ever Exist. In the same way that every tool is really a screwdriver. -- Stev

Re: How to efficiently extract information from structured text file

2010-02-17 Thread Jonathan Gardner
On Feb 16, 3:48 pm, Imaginationworks wrote: > Hi, > > I am trying to read object information from a text file (approx. > 30,000 lines) with the following format, each line corresponds to a > line in the text file.  Currently, the whole file was read into a > string list using readlines(), then use

Re: How to efficiently extract information from structured text file

2010-02-17 Thread Imaginationworks
On Feb 17, 1:40 pm, Paul McGuire wrote: > On Feb 16, 5:48 pm, Imaginationworks wrote: > > > Hi, > > > I am trying to read object information from a text file (approx. > > 30,000 lines) with the following format, each line corresponds to a > > line in the text file.  Currently, the whole file was

Re: How to efficiently extract information from structured text file

2010-02-17 Thread Paul McGuire
On Feb 16, 5:48 pm, Imaginationworks wrote: > Hi, > > I am trying to read object information from a text file (approx. > 30,000 lines) with the following format, each line corresponds to a > line in the text file.  Currently, the whole file was read into a > string list using readlines(), then use

Re: How to efficiently extract information from structured text file

2010-02-17 Thread Imaginationworks
On Feb 16, 7:14 pm, Gary Herron wrote: > Imaginationworks wrote: > > Hi, > > > I am trying to read object information from a text file (approx. > > 30,000 lines) with the following format, each line corresponds to a > > line in the text file.  Currently, the whole file was read into a > > string l

Re: How to efficiently extract information from structured text file

2010-02-16 Thread Gary Herron
Imaginationworks wrote: Hi, I am trying to read object information from a text file (approx. 30,000 lines) with the following format, each line corresponds to a line in the text file. Currently, the whole file was read into a string list using readlines(), then use for loop to search the "= {"

Re: How to efficiently extract information from structured text file

2010-02-16 Thread Rhodri James
On Tue, 16 Feb 2010 23:48:17 -, Imaginationworks wrote: Hi, I am trying to read object information from a text file (approx. 30,000 lines) with the following format, each line corresponds to a line in the text file. Currently, the whole file was read into a string list using readlines()

How to efficiently extract information from structured text file

2010-02-16 Thread Imaginationworks
Hi, I am trying to read object information from a text file (approx. 30,000 lines) with the following format, each line corresponds to a line in the text file. Currently, the whole file was read into a string list using readlines(), then use for loop to search the "= {" and "};" to determine the