def onFileRead(self, filePath):
     if filePath:
         try:
             workerList = FileUtil.readAll(filePath)
             wx.MessageBox(u"导入数据成功", u"导入数据", style=wx.OK | wx.ICON_EXCLAMATION)
             return workerList
         except Exception as e:
             wx.MessageBox(u"导入数据失败,请检测数据格式,并保证文件为UTF-8格式", u"导入数据", style=wx.OK | wx.ICON_EXCLAMATION)
             wx.MessageBox(str(e))
             return list()
예제 #2
0
 def onFileRead(self, filePath):
     if filePath:
         # try:
         lines = FileUtil.readAll(filePath)
         self.updateGrid(lines)
         wx.MessageBox("导入数据成功" + ' '.join(lines), "导入数据", style=wx.OK | wx.ICON_EXCLAMATION)