file bug???

David M. Wilson dw-google.com at botanicus.net
Fri Nov 21 05:21:45 EST 2003


pythonguy at Hotpop.com (Anand Pillai) wrote in message news:<84fc4588.0311210000.5b925947 at posting.google.com>...

> In Line 15, you are using a local variable named 'file'
> which is being used to walk a list of files. When you
> are using a keyword as a variable, python gets confused
> and thinks that you are trying to use a variable before it
> is being defined.

If by 'keyword' you mean 'language keyword', then you are wrong.
Assignments to keywords obviously do not work. Assignments to names
from __builtins__ does.


> o 'os' module does not have a function 'walk'. Change it to os.path.walk.
> o  os.path.walk takes 3 arguments, not one. You need to correct this.

It does now. Read the current Python documentation.


David.




More information about the Python-list mailing list