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 fileinput
>
> # cycle through files
> for line in fileinput.input():
>    if (fileinput.isfirstline()):
>       if (fileinput.lineno > 1):

You forget the () after lineno

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to