Ignore:
Timestamp:
Oct 11, 2018 12:20:56 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
Children:
98b9f32
Parents:
67ed543
Message:

improved support for py37 in sasgui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/simfitpage.py

    r20fa5fe r5251ec6  
    168168        i = 0 
    169169        for model in self.model_list: 
    170             model_id = self._format_id(model[1].keys()[0]) 
     170            model_id = self._format_id(list(model[1].keys())[0]) 
    171171            for saved_model in sim_state.model_list: 
    172172                save_id = saved_model.pop('name') 
     
    328328        sizer.Add(tab_used, (iy, ix), (1, 1), 
    329329                  wx.EXPAND | wx.ADJUST_MINSIZE, 0) 
    330         for id, value in self.page_finder.iteritems(): 
     330        for id, value in self.page_finder.items(): 
    331331            if id not in self.parent.opened_pages: 
    332332                continue 
     
    757757        self.set_button.Disable() 
    758758 
    759         for id, model in self.constraint_dict.iteritems(): 
     759        for id, model in self.constraint_dict.items(): 
    760760            # check if all parameters have been selected for constraint 
    761761            # then do not allow add constraint on parameters 
    762762            self.model_cbox_left.Append(str(model.name), model) 
    763763        self.model_cbox_left.Select(0) 
    764         for id, model in self.constraint_dict.iteritems(): 
     764        for id, model in self.constraint_dict.items(): 
    765765            # check if all parameters have been selected for constraint 
    766766            # then do not allow add constraint on parameters 
     
    814814        model_right = self.model_cbox_right.GetValue() 
    815815        model_b = self.model_cbox_right.GetClientData(selection_b) 
    816         for id, dic_model in self.constraint_dict.iteritems(): 
     816        for id, dic_model in self.constraint_dict.items(): 
    817817            if model == dic_model: 
    818818                param_list = self.page_finder[id].get_param2fit() 
     
    857857        if len(self.constraints_list) != 0: 
    858858            nb_fit_param = 0 
    859             for id, model in self.constraint_dict.iteritems(): 
     859            for id, model in self.constraint_dict.items(): 
    860860                nb_fit_param += len(self.page_finder[id].get_param2fit()) 
    861861            # Don't add anymore 
     
    879879        model_cbox = wx.ComboBox(self, wx.ID_ANY, style=wx.CB_READONLY) 
    880880        model_cbox.Clear() 
    881         for id, model in self.constraint_dict.iteritems(): 
     881        for id, model in self.constraint_dict.items(): 
    882882            # check if all parameters have been selected for constraint 
    883883            # then do not allow add constraint on parameters 
     
    931931        hide buttons related constraint 
    932932        """ 
    933         for id in self.page_finder.iterkeys(): 
     933        for id in self.page_finder.keys(): 
    934934            self.page_finder[id].clear_model_param() 
    935935 
     
    969969        model = model_cbox.GetClientData(n) 
    970970        param_list = [] 
    971         for id, dic_model in self.constraint_dict.iteritems(): 
     971        for id, dic_model in self.constraint_dict.items(): 
    972972            if model == dic_model: 
    973973                param_list = self.page_finder[id].get_param2fit() 
     
    10561056                msg += " in combobox to set constraint! " 
    10571057                wx.PostEvent(self.parent.parent, StatusEvent(status=msg)) 
    1058             for id, value in self.constraint_dict.iteritems(): 
     1058            for id, value in self.constraint_dict.items(): 
    10591059                if model == value: 
    10601060                    if constraint == "": 
     
    10801080                        return False 
    10811081 
    1082                     for fid in self.page_finder[id].iterkeys(): 
     1082                    for fid in self.page_finder[id].keys(): 
    10831083                        # wrap in param/constraint in str() to remove unicode 
    10841084                        self.page_finder[id].set_model_param(str(param), 
Note: See TracChangeset for help on using the changeset viewer.