Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a simple file browser in wxPython?

I'm starting to learn both Python and wxPython and as part of the app I'm doing, I need to have a simple browser on the left pane of my app. I'm wondering how do I do it? Or at least point me to the right direction that'll help me more on how to do one. Thanks in advance!

EDIT: a sort of side question, how much of wxPython do I need to learn? Should I use tools like wxGlade?

like image 524
ajushi Avatar asked Jan 22 '23 20:01

ajushi


2 Answers

I think that the GenericDirCtrl widget could be of use for you. This tutorial has many examples, among them a simple usage of that widget in a complete script (screenshot pasted below). And I strongly recommend not to start with wxGlade, but manually layout your first few wx GUIs (with the appropriate sizers). You will learn a lot from this.

alt text

like image 199
Eli Bendersky Avatar answered Jan 29 '23 21:01

Eli Bendersky


You can take a look at the wxPython examples, they also include code samples for almost all of the widgets supported by wxPython. If you use Windows they can be found in the Start Menu folder of WxPython.

like image 36
fviktor Avatar answered Jan 29 '23 19:01

fviktor