[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] File Loader Window
For wxPython? Don't use the examples unless you're desperate--they're ridiculously complex. If you do indeed want wxPython, do:
import wx
wildcard = ".AVI Audio (*.avi)|*.avi|"\
"All files (*.*)|*.*"
def open file():
app = wx.PySimpleApp()
file_picker = wx.FileDialog(None,wildcard=wildcard,style=wx.FD_OPEN|wx.FD_CHANGE_DIR|wx.FD_FILE_MUST_EXIST)
file_picker.ShowModal()
path = file_picker.GetPath()
app.Destroy()
return path
Ian