textual icon indicating copy to clipboard operation
textual copied to clipboard

DirectoryTree: remove example code as examples/code_browser.py already covers that

Open 1ace opened this issue 3 years ago • 5 comments

We're not all lucky enough to be @willmcgugan :stuck_out_tongue_winking_eye:

1ace avatar Oct 23 '22 19:10 1ace

I had that fix lying around for ages and just posted it, but actually even with that it's still broken now.

I'll try fixing it properly; closing for now

1ace avatar Oct 23 '22 19:10 1ace

That was test code, which should probably just be removed. Were you trying to get python -m textual.widgets._directory_tree to work?

willmcgugan avatar Oct 23 '22 19:10 willmcgugan

Yeah, python -m textual.widgets._directory_tree is how I was using that.

It was actually easy to fix, so re-opening with that, but perhaps it should be moved into examples/ instead?

1ace avatar Oct 23 '22 20:10 1ace

Added a commit to move the example code to examples/tree.py, and changed the $HOME to . as it should be a smaller folder to list (likely will be the textual folder itself)

1ace avatar Oct 23 '22 20:10 1ace

Actually examples/code_browser.py already covers the use of DirectoryTree, so I've replaced everything in this PR with just deleting that code :upside_down_face:

1ace avatar Oct 23 '22 20:10 1ace