Skip to content
Advertisement

Eel – ask for directory input

I am developing modern-looking local app in Python with Eel and I want to open OS’s default dialog to select directory. But I have found that Eel does not provide that.

I have tried:

  • dialog from HTML/JS, but browser provides just dialog for file/s selection.
  • local dialogs from other libraries, but they are really ugly and not using the default one, for example:

Tkinter (ttk is not that much better):

tkinter

tkfilebrowser:

tkfilbrowser

Anybody knows, how can I open OS’s default directory selection via some simple lightweight library/eel? (at least on Linux-Ubuntu and Windows)

default

Or are there any other lightweight alternatives to eel, that would do that? I know about pywebview, but it is slower than eel and it is not that lightweight.

Advertisement

Answer

I don’t think there is any way to change how the tkinter folder selection dialog looks. But you can use something like this (should work on Linux):

JavaScript

If you change the COMMAND, based on the OS, you should be able to get this to work on all OSes.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement