def setUp(self):
     self.sample_data = np.array(self.random_data())
     self.sample_data_basename = "sample.dat"
     self.sample_data_file = os.path.join(os.path.dirname(__file__),
                                          self.sample_data_basename)
     with h5py.File(self.sample_data_file, 'w') as fidout:
         fidout.create_dataset(self.sample_data_basename, data=self.sample_data)
     self.mock_controller = ""
     self.model = model.MainModel(self.mock_controller)
     cfg = config.Configure(pathfinder.config_path())
     self.original_loglevel = cfg.get_app_option("log level")
Beispiel #2
0
    def __init__(self, parent):
        maingui.MainFrame.__init__(self, parent)
        self.Fit()

        BindingCheckBox('loadonstart')
        BindingCheckBox('emptydriveletters')
        BindingCheckBox('capitaldriveletters')
        BindingCheckBox('skipfloppys')

        self.model = mainmodel.MainModel()
        if self.loadonstart.value:
            self.model.RefreshDosDevices()
Beispiel #3
0
    def __init__(self, parent):
        maingui.MainFrame.__init__(self, parent)

        wxfb.BindingFilePicker('fileread')
        wxfb.BindingCheckBox('loadlast', default=True)

        wxfb.BindingButton('recalculate')
        wxfb.BindingButton('save')
        wxfb.BindingButton('saveas')

        wxfb.BindingTextCtrl('crcold', config=False)
        wxfb.BindingTextCtrl('crcnew', config=False)

        self.model = mainmodel.MainModel()
        if self.loadlast.value and self.fileread.path:
            if os.path.isfile(self.fileread.path):
                self.model.load(self.fileread.path)
Beispiel #4
0
 def init_model(self):
     """Creates and connects the model, ensures data paths are available"""
     self.model = mainmodel.MainModel(self)