Is there a cross-platform way to open a file browser in Python?

后端 未结 3 1554
伪装坚强ぢ
伪装坚强ぢ 2021-02-19 07:16

I\'m thinking something along the lines of the webbrowser module, but for file browsers. In Windows I\'d like to open explorer, in GNOME on Linux I want to open nautilus, Konque

3条回答
  •  悲哀的现实
    2021-02-19 07:43

    This is a complete stab in the dark, but take a look at wxPython which provides Python bindings to the underlying wxWidgets library. It has been a long time since I last looked at it, but there might be something there that you can use. Otherwise, it should be relatively easy to make your own file browser that will use the native "widgets" for each OS.

    Mind you, wxPython is not light weight, it will really bulk up your application and increase your dependencies.

提交回复
热议问题