Re: iterate start at second row in file not first

2008-05-21 Thread Chris
On May 20, 8:34 pm, [EMAIL PROTECTED] wrote: > i have a big file with sentences, the first file of each sentence > contains a colon(:) somewher eon that line > i want to jump past that sentence. > > if all(x != ':' for x in line): > > this way i can check but i dont want to check for every line in

Re: iterate start at second row in file not first

2008-05-20 Thread Paul Hankin
On May 20, 7:34 pm, [EMAIL PROTECTED] wrote: > i have a big file with sentences, the first file of each sentence > contains a colon(:) somewher eon that line > i want to jump past that sentence. > > if all(x != ':' for x in line): > > this way i  can check but i dont want to check for every line in

Re: iterate start at second row in file not first

2008-05-20 Thread Scott David Daniels
Mark d. wrote: How about: mov = open(afile) line = mov.readline() ...(process your ':' line) for line in mov.readlines(): ... The problem here is that you read the entire file in in the call to readlines. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/py

Re: iterate start at second row in file not first

2008-05-20 Thread Mark d.
How about: mov = open(afile) line = mov.readline() ...(process your ':' line) for line in mov.readlines(): ... On May 20, 1:34 pm, [EMAIL PROTECTED] wrote: > i have a big file with sentences, the first file of each sentence > contains a colon(:) somewher eon that line > i want to jump past th

Re: iterate start at second row in file not first

2008-05-20 Thread Falcolas
On May 20, 12:34 pm, [EMAIL PROTECTED] wrote: > how do i jump the first step there? i dont want to iterate the first > row...how do i start at the second? To simply bypass the first line, do a readline() on the file object before starting to process the file. To filter out particular lines throug

Re: iterate start at second row in file not first

2008-05-20 Thread jay graves
On May 20, 1:34 pm, [EMAIL PROTECTED] wrote: > i have a big file with sentences, the first file of each sentence > contains a colon(:) somewher eon that line > i want to jump past that sentence. > > if all(x != ':' for x in line): > > this way i can check but i dont want to check for every line in