Skip to content

Instantly share code, notes, and snippets.

@jpihl
jpihl / walk_up.py
Last active June 21, 2018 08:16 — forked from zdavkeos/walk_up.py
python walk_up - like os.walk, only works its way up instead of down
#!/usr/bin/env python
"""
os.walk is an awesome generator.
However, I needed the same functionality,
only I wanted to walk 'up' the
directory tree.
This allows seaching for files
in directories directly above
a given directory.