custom_context.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:wxpythoncookbookcode 作者: driscollis 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号