def on_open(self, evt):
print 'xxx', os.getcwd()
dlg = wx.FileDialog(
self, message="Choose a file",
defaultDir=os.getcwd(),
defaultFile="",
#wildcard=wildcard,
style=wx.OPEN | wx.CHANGE_DIR
)
print 'yyy',os.getcwd()
if dlg.ShowModal() == wx.ID_OK:
paths = dlg.GetPaths()
if paths[0]:
print os.getcwd()
self.dirname, self.filename = os.path.split(paths[0])
self.status_bar.SetStatusText(paths[0])
print os.getcwd()
if self.dvc is None:
self.create_inside_panel()
if self.model is not None:
old_model = self.model
old_model.Clear()
else:
old_model = None
self.model = self.get_model_from_LIS(paths[0])
print os.getcwd()
self.dvc.AssociateModel(self.model)
if old_model:
del old_model
评论列表
文章目录