os.path.walk() question.
Andrew McDowell
drew.mcdowell at msfc.nasa.gov
Tue Apr 25 18:19:44 EDT 2000
I didn't see this question mentioned in any older posts so forgive me if I'm
dragging up and old topic...but:
I need to find out if a file exists under a directory hierarchy.
The hierarchy could be quite large so I don't want to continue recursing
through the hierarchy if the file is found one or two directories down. Is
there a way that you can tell os.path.walk() to stop searching?
I suppose I could customize the code, but my first notion was that someone
on the group had probably addressed this before.
Any advice would be much appreciated :)
-Drew
More information about the Python-list
mailing list