def OnOpenEtotV(self, event):
wildcard = "dat file (*.dat)|*.dat|" \
"All files (*)|*"
dialog = wx.FileDialog(None, "Choose a file with total energies", os.getcwd(),"", wildcard)
if dialog.ShowModal() == wx.ID_OK:
try:
fname = dialog.GetPath()
self.V, self.E = read_EtotV(fname)
self.IsEtotVRead = True
self.SetStatusText("E_tot(V) file "+fname+" read")
except:
wx.MessageBox("Something wrong while opening the E_tot file... not loaded.",
"", wx.OK | wx.ICON_EXCLAMATION, self)
dialog.Destroy()
评论列表
文章目录