Hello members: I developed a Python module to make a list which contains all the files ending with .shp and .dbf extensions, I have solved this already, but now I want to write an excel file from it. The file should show the full path from the found files. This is the code:
import os a = open ("directorio.xls","w") allfiles = [] #store all files found for root,dir,files in os.walk("C:\\"): filelist = [ os.path.join(root,fi) for fi in files if fi.endswith(".shp") or fi.endswith(".dbf") ] for f in filelist: allfiles.append(f) for i in allfiles: print i a.write(i) a.write("\n") With the code above, I have the print and the .xls file with this information in it, the issue here is that my file doesn't have the complete information that I got in the console. Any idea? The last line from excel is C:\Python26
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor