use characters we can show with terminalio in example
This commit is contained in:
parent
3aa6b4ce7a
commit
2c3d0c3033
1 changed files with 2 additions and 2 deletions
|
|
@ -12,10 +12,10 @@ def print_directory_tree(path: adafruit_pathlib.Path, prefix: str = ""):
|
|||
|
||||
entries = sorted(path.iterdir(), key=lambda x: (not x.is_dir(), x.name.lower()))
|
||||
for index, entry in enumerate(entries):
|
||||
connector = "├── " if index < len(entries) - 1 else "└── "
|
||||
connector = "|-- " if index < len(entries) - 1 else "'-- "
|
||||
print(f"{prefix}{connector}{entry.name}")
|
||||
if entry.is_dir():
|
||||
extension = "│ " if index < len(entries) - 1 else " "
|
||||
extension = "| " if index < len(entries) - 1 else " "
|
||||
print_directory_tree(entry, prefix + extension)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue