En Fri, 11 May 2007 13:25:55 -0300, fscked <[EMAIL PROTECTED]> escribió:
>> import os, sys, os.path, fnmatch >> >> def findinterestingfiles(root_dir): >> for dirpath, dirnames, filenames in os.walk(root_dir): >> if "Archived" in dirnames: >> dirnames.remove("Archived") >> for filename in fnmatch.filter(filenames, '*Config*.xml'): >> fullfn = os.path.join(dirpath, filename) >> print fullfn >> >> myfile = open("boxids.txt", "r") >> for line in myfile: >> dirname = os.path.join('D:\\Dir\\', line.strip()) >> findinterestingfiles(dirname): >> myfile.close() > Should this code work? I get a syntax error and cannot figure out why. Sorry, remove the spurious : after findinterestingfiles(dirname) and it should work fine. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list