Re: How do you limit the # of lines Read?

2007-09-18 Thread James Matthews
for i in range(): line = file.readline() On 9/18/07, John Machin <[EMAIL PROTECTED]> wrote: > > On Sep 19, 6:59 am, [EMAIL PROTECTED] wrote: > > I am working on a loop for my code and was wondering if there is a way > > to limit the number of lines read through? I'd hate to cut the test > > fi

Re: How do you limit the # of lines Read?

2007-09-18 Thread John Machin
On Sep 19, 6:59 am, [EMAIL PROTECTED] wrote: > I am working on a loop for my code and was wondering if there is a way > to limit the number of lines read through? I'd hate to cut the test > file in order to run the code in the testing phase. Can you add a > value in the parenthesis of the readlin

Re: How do you limit the # of lines Read?

2007-09-18 Thread Paul McNett
[EMAIL PROTECTED] wrote: > I am working on a loop for my code and was wondering if there is a way > to limit the number of lines read through? I'd hate to cut the test > file in order to run the code in the testing phase. Can you add a > value in the parenthesis of the readline() function? > > t

Re: How do you limit the # of lines Read?

2007-09-18 Thread Marc 'BlackJack' Rintsch
On Tue, 18 Sep 2007 13:59:47 -0700, koutoo wrote: > I am working on a loop for my code and was wondering if there is a way > to limit the number of lines read through? I'd hate to cut the test > file in order to run the code in the testing phase. Can you add a > value in the parenthesis of the r

How do you limit the # of lines Read?

2007-09-18 Thread koutoo
I am working on a loop for my code and was wondering if there is a way to limit the number of lines read through? I'd hate to cut the test file in order to run the code in the testing phase. Can you add a value in the parenthesis of the readline() function? t = string.readline() # Limit this so