Added viewing of path specified by command line argument.

This commit is contained in:
The Wobbler 2025-01-10 19:01:36 +01:00
parent dfd05e1732
commit f33e751683

View file

@ -1,5 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
import os import os
import sys
from ..utils import module_path from ..utils import module_path
from .format import format_string from .format import format_string
@ -65,4 +66,10 @@ def tree_view(
if __name__ == "__main__": if __name__ == "__main__":
print(tree_view(module_path, exclude_names=["__pycache__"])) if len(sys.argv) == 1: # use first command line argument when set, else use the module path
path = module_path
else:
path = sys.argv[1]
print(tree_view(path, exclude_names=["__pycache__"]))