mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
17 lines
310 B
Python
17 lines
310 B
Python
from textual.app import App
|
|
|
|
from textual.containers import Container
|
|
from textual.widgets import DirectoryTree
|
|
|
|
|
|
class TreeApp(App):
|
|
def compose(self):
|
|
tree = DirectoryTree("~/projects")
|
|
yield Container(tree)
|
|
tree.focus()
|
|
|
|
|
|
app = TreeApp()
|
|
if __name__ == "__main__":
|
|
app.run()
|