Re: counting lines using fileinput module

2008-02-13 Thread Robert
On Feb 13, 8:31 pm, 7stud <[EMAIL PROTECTED]> wrote: > On Feb 13, 6:47 pm, Robert <[EMAIL PROTECTED]> wrote: > > > > > I would like to count lines in a file using the fileinput module and I > > am getting an unusual output. > > ---

Re: counting lines using fileinput module

2008-02-13 Thread 7stud
On Feb 13, 6:47 pm, Robert <[EMAIL PROTECTED]> wrote: > I would like to count lines in a file using the fileinput module and I > am getting an unusual output. > --- > --- > #!/usr/bin/python > import fileinput > > # cycle thro

Re: counting lines using fileinput module

2008-02-13 Thread Gabriel Genellina
En Wed, 13 Feb 2008 23:47:11 -0200, Robert <[EMAIL PROTECTED]> escribió: > I would like to count lines in a file using the fileinput module and I > am getting an unusual output. > -- > #!/usr/bin/python > import fileinpu

counting lines using fileinput module

2008-02-13 Thread Robert
I would like to count lines in a file using the fileinput module and I am getting an unusual output. -- #!/usr/bin/python import fileinput # cycle through files for line in fileinput.input(): if (fileinput.isfirstline()