On Sat, 25 Jun 2005 06:41:01 -0400
Kent Johnson <[EMAIL PROTECTED]> wrote:
> You named your program fileinput.py, so when you import fileinput
> you are getting your own program again instead of the library
> module. Change the name of your program and try again.
Doh! I do remember reading that s
> Traceback (most recent call last):
> File "./Python/fileinput.py", line 1, in ?
> import sys, string, fileinput
You are importing fileinput from a file called fileinput.
It therefore reads your file and notices that you have
no input method...
Don't call your program the same name as the
Kevin Reeder wrote:
> I'm getting unexpected behaviour from this module. My script is
> meant to count the number of occurences of a term in one or more
> files.
>
> ---
>
> import sys, string, fileinput
>
> searchterm, sys.argv[1:] = sys.argv[1], sys.argv[2:]
>
> for line in fileinput.input():