Choose a file from FileDialog : FileDialog : WxPython PYTHON TUTORIALS


PYTHON TUTORIALS » WxPython » FileDialog »

 

Choose a file from FileDialog


import wx
import os


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.OPEN)
if dialog.ShowModal() == wx.ID_OK:
    print dialog.GetPath() 

dialog.Destroy()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo WxPython
» FileDialog