def onOpenFile(self, event):
""""""
wildcard = "Python source (*.py)|*.py|" \
"All files (*.*)|*.*"
kwargs = {'message':"Choose a file",
'defaultDir':os.path.dirname(os.path.abspath( __file__ )),
'defaultFile':"",
'wildcard':wildcard,
'style':wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR
}
with ContextFileDialog(self, **kwargs) as dlg:
if dlg.ShowModal() == wx.ID_OK:
paths = dlg.GetPaths()
print "You chose the following file(s):"
for path in paths:
print path
评论列表
文章目录