Traverse the file tree.
Project description
Walkmate
Traverse the file tree.
Installation
pip install walkmate
Usage
Given a multi-level directory structure:
.
├── one.py
├── two.py
└── child
└── three.py
We can list all the files tree:
>>> tree("test/fixtures")
["one.py", "two.py", "child/three.py"]
Filter with a regex:
>>> tree("test/fixtures", r"one\.py$")
["one.py"]
Add exlude patterns too:
>>> tree("test/fixtures", r"\.py$", [r"one\.py$"])
["two.py", "child/three.py"]
Specify the maximum depth:
>>> tree("test/fixtures", depth=1)
["one.py", "two.py"]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
walkmate-1.5.0.tar.gz
(2.5 kB
view hashes)