Python 3 WxPython File Picker Dialog Matching Different Extensions Wildcards GUI Desktop App Full Project For Beginners

Python 3 WxPython File Picker Dialog Matching Different Extensions Wildcards GUI Desktop App Full Project For Beginners

 

Welcome folks today in this blog post we will be looking at wxpython fil dialog picker matching different extensions. All the full source code of the application is given below.

 

 

Get Started

 

 

In order to get started you need to install the below library using the pip command as shown below

 

pip install wxpython

 

After installing this library you need to make an app.py file and copy paste the following code

 

app.py

 

import wx
import os

if __name__ == "__main__":
    app = wx.PySimpleApp()
    wildcard = "Python source (*.py)|*.py|" \
            "Compiled Python (*.pyc)|*.pyc|" \
            "All files (*.*)|*.*"
    dialog = wx.FileDialog(None, "Choose a file", os.getcwd(), 
            "", wildcard, wx.FD_OPEN)
    if dialog.ShowModal() == wx.ID_OK:
        print(dialog.GetPath()) 

    dialog.Destroy()

 

 

If you execute the above python script by typing the below command

See also  Python 3 PyQt5 Changing Background Color of Push Button on Mouse Hover Transition GUI Desktop App Full Project For Beginners

 

python app.py

 

 

Leave a Reply