Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PathTag enhancement #17

Open
e3rd opened this issue Mar 16, 2025 · 2 comments
Open

PathTag enhancement #17

e3rd opened this issue Mar 16, 2025 · 2 comments

Comments

@e3rd
Copy link
Member

e3rd commented Mar 16, 2025

The PathTag wraps over pathlib.Path. It has multiple attribute that store the information for UI, whether the UI should pick one or multiple paths.

In the GUI interface, it works well. Note the button that open a basic (and ugly) file picker.

m = run(interface="gui")
out = m.form({
    "File 1": PathTag("/tmp"),
})

Image

** Multiple attributes **

The PathTag should have file_exist and is_dir attributes that turns on filtering for file picker.

** Textual support **

The same should work for the textual interface too. Currently, it behaves just any other str. Which is sufficient but poor.

m = run(interface="tui")
out = m.form({
    "File 1": PathTag("/tmp"),
})
@umutdz
Copy link

umutdz commented Mar 16, 2025

Hi, @e3rd; this is a nice idea; I'm on it!

@e3rd
Copy link
Member Author

e3rd commented Mar 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants