def get_input_params(self): case = self.input_choice.GetStringSelection() #pdb.set_trace() mydict = self.build_params_dict() for key, val in mydict.items(): val = xml_utils.try_string_to_number(val) mydict[key] = val exit_status = validate_dict(mydict) if not exit_status: return case, None else: return case, mydict
starting_dict[key] = val #starting_dict.update(defaults_dict) self.display_params(starting_dict) def on_input_choice(self, event=0): print('in on_input_choice') key = self.input_choice.GetStringSelection() self._set_params(key) def get_input_params(self): case = self.input_choice.GetStringSelection() #pdb.set_trace() mydict = self.build_params_dict() for key, val in mydict.items(): val = xml_utils.try_string_to_number(val) mydict[key] = val exit_status = validate_dict(mydict) if not exit_status: return case, None else: return case, mydict def __init__(self, parent): pre = wx.PrePanel() res = xrc.XmlResource(xrc_path) res.LoadOnPanel(pre, parent, "main_panel") self.PostCreate(pre) self.parent = parent ## self.Bind(wx.EVT_BUTTON, self.on_update_diagram, \
def set_params_as_attrs(self): for key, val in self.params.iteritems(): val = xml_utils.full_clean(val) val = xml_utils.try_string_to_number(val) setattr(self, key, val)