Python Print Directory Tree
Mimicking Linux Tree Utility
Introduction
Many blogs are showing how to print directory tree using Python. Drawing from those examples, we built our version. The primary drivers were:
- Compatibility with Python3
- Print symbolic links
- Limit depth of tree
Example output:
1 2 3 4 5 6 7 8 9 10 …