2011/6/10 B G <compbiocancerresearc...@gmail.com> > > path = "...\\Leukemia_Project" > i = 0 > for (files) in os.walk(path): > print(files) > print("\n") > i += 1 >
Continuing my thoughts: I ran your loop, and got several tuples, each representing a directory. All the tuples have the same structure: 0th element is the name of the directory, followed by a list of subdirs (possibly empty) and a list of files (possibly empty). I find no reason to maipulate this by Excel. Try instead: def clean(f): any processing, removing here path = ".../Leukemia_Project" dirlists = [] for (files) in os.walk(path): print(files) dirlists.append(clean(files)) print("\n") Then go on with next step. You will enjoy your work more than with printing-marking-copying-pasting-saving-opening-processing-saving-reopening...
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor