On Sun, 25 May 2025 at 10:05, Rob Cliffe via Python-list <python-list@python.org> wrote: > Yes, but if I understand correctly, they all start from a single > directory (and work downwards if required). > My suggestion involved searching a *list* (possibly multiple lists) of > directories.
for dir in dirs: try: open(dir + "/" + fn).close() except FileNotFoundError: pass else: break Is this really all that difficult? Not everything has to be in the stdlib. ChrisA -- https://mail.python.org/mailman3//lists/python-list.python.org