I am trying to do something to all the files under a given path. I don\'t want to collect all the file names beforehand then do something with them, so I tried this:
<
Change this:
explore(path)
To this:
for subpath in explore(path): yield subpath
Or use os.walk, as phooji suggested (which is the better option).
os.walk