os.path.walk() question.

Robert Roy rjroy at takingcontrol.com
Tue May 16 00:13:12 EDT 2000


On 25 Apr 2000 22:19:44 GMT, "Andrew McDowell"
<drew.mcdowell at msfc.nasa.gov> wrote:

names[:] = []

>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