On Sat, 09 Jul 2005 13:49:12 +0200,
Florian Lindner <[EMAIL PROTECTED]> wrote:

> Hello,
> I try to compute SHA hashes for different files:


> for root, dirs, files in os.walk(sys.argv[1]):
>     for file in files:
>         path =  os.path.join(root, file)
>         print path
>         f = open(path)
>         sha = sha.new(f.read())
          ^^^

Now the name "sha" no longer refers to the sha module, but to the object
returned by sha.new.  Use a different name.

>         sha.update(f.read())
>         print sha.hexdigest()

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to