Added utils.py and improved the example of the tree view.

This commit is contained in:
The Wobbler 2025-01-10 18:55:07 +01:00
parent 5f6f89d17d
commit dfd05e1732
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/python3
import os
from wobbl_tools.text.format import format_string
from ..utils import module_path
from .format import format_string
def tree_view(
@ -64,4 +65,4 @@ def tree_view(
if __name__ == "__main__":
print(tree_view("/home/emil/Dokumente/python/wobbl_tools/wobbl_tools/", exclude_names=["__pycache__"]))
print(tree_view(module_path, exclude_names=["__pycache__"]))

5
wobbl_tools/utils.py Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/python3
import os
module_path = os.path.dirname(os.path.abspath(__file__))