luis wrote: > for root, dirs, files in os.walk(path): > for file in files: > # ¿ is opened ? >
¡ rtfm ! "files" is a list of fileNAMEs -- i.e. strings. ¿ How could you possibly imagine that your sample code would open a file? What a design-nonsense that would be: instant complaints from folk who wanted to do some further selection before opening (if they ever wanted to open the files at all). ¿ Did you contemplate *trying* this code to see what happened ? ¡ Don't use "file" as a name; it shadows the built-in file function ! -- http://mail.python.org/mailman/listinfo/python-list