コード例 #1
0
 def select_model(self, e):
     """
     Only one
     """
     file_chooser = wx.FileDialog(self,
                                  message="Choose a file",
                                  wildcard="*.biopepa",
                                  style=wx.OPEN | wx.CHANGE_DIR)
     if file_chooser.ShowModal() == wx.ID_OK:
         path = file_chooser.GetPaths()[0]
         self.model_list.Append(path.split('/')[-1])
         self.model_parser = Biopepa_Model_Parser()
         self.model_parser.parse(path)
         self.tree = self.model_parser.build_graph()
         file_chooser.Destroy()
     else:
         file_chooser.Destroy()