Don't understand error message
Mike Steed
MSteed at altiris.com
Tue Apr 25 13:24:57 EDT 2000
> From: Michael Hudson [mailto:mwh21 at cam.ac.uk]
> Sent: Tuesday, April 25, 2000 11:22 AM
> To: python-list at python.org
> Subject: Re: Don't understand error message
>
>
> "Lars Lundstedt" <lars.lundstedt at telia.com> writes:
>
> > import sys, glob, operator
> > print sys.argv[1:]
> > sys.argv = reduce(operator.add, map(glob.glob, sys.argv))
> > print sys.argv[1:]
> >
> > When called with "python glob.py *.py" on Win98 I'm
> supposed to get a list
> > of all .py files in the current directory but instead I get:
> >
> > Traceback (innermost last):
> > File "glob.py", line 1, in ?
> > import sys, glob, operator
> > File "glob.py", line 3, in ?
> > list = reduce(operator.add, map(glob.glob, '*.py'))
> > TypeError: call of non-function (type module)
> >
> > Anyone know why?
>
> "Works here". Is that *really* your *entire* script? You haven't
> snuck a module called "reduce" in anywhere?
It works on WinNT 4 too. I see that the line that Python is complaining
about does not appear anywhere in the script in your message (close, but not
exactly). Something is missing.
> Mind you, I'm on Linux - but that's shouldn't really affect this.
>
> Cheers,
> M.
^^
(I thought that was my .sig)
M.
More information about the Python-list
mailing list