mobile_insight_gui.py 文件源码

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

项目:mobileinsight-core 作者: mobile-insight 项目源码 文件源码
def Open(self, e):
        openFileDialog = wx.FileDialog(
            self,
            "Open Log file",
            "",
            "",
            "log files (*.mi2log) |*.mi2log| All files |*.*",
            wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE)
        if (openFileDialog.ShowModal() == wx.ID_OK):
            # print 'Selected %s' %openFileDialog.GetPath()
            print 'Selected %s' % openFileDialog.Paths
            try:
                self.grid.ClearGrid()

                # thread.start_new_thread(openFile,(openFileDialog.GetPath(),))
                # t = Thread(target = self.openFile, args=(openFileDialog.GetPath(),self.selectedTypes))
                t = Thread(
                    target=self.openFile,
                    args=(
                        openFileDialog.Paths,
                        self.selectedTypes))
                self.progressDialog = ProgressDialog(self)
                t.start()
                self.progressDialog.ShowModal()

                if len(openFileDialog.Paths) == 1:
                    self.SetTitle(openFileDialog.GetPath())
                else:
                    self.SetTitle(
                        "Multiple files in " +
                        openFileDialog.Directory)

            except e:
                print "Error while opening file.", e
            # if (random() > 0.5):
            #    self.SetupGrid(self.data1)
            # else:
            #    self.SetupGrid(self.data2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号