Ignore:
Timestamp:
Nov 15, 2017 2:33:09 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
d4881f6a
Parents:
7c487846
Message:

Initial commit of the P(r) inversion perspective.
Code merged from Jeff Krzywon's ESS_GUI_Pr branch.
Also, minor 2to3 mods to sascalc/sasgui to enble error free setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/data_operator.py

    • Property mode changed from 100644 to 100755
    r7432acb rfa81e94  
    202202        else: 
    203203            text = name 
    204         state_list = self.get_datalist().values() 
     204        state_list = list(self.get_datalist().values()) 
    205205        name_list = [] 
    206206        for state in state_list: 
    207207            if state.data is None: 
    208208                theory_list = state.get_theory() 
    209                 theory, _ = theory_list.values()[0] 
     209                theory, _ = list(theory_list.values())[0] 
    210210                d_name = str(theory.name) 
    211211            else: 
     
    397397            self._set_textctrl_color(self.data1_cbox, 'pink') 
    398398            self._set_textctrl_color(self.data2_cbox, 'pink') 
    399             msg = "DataOperation: %s" % sys.exc_value 
     399            msg = "DataOperation: %s" % sys.exc_info()[1] 
    400400            self.send_warnings(msg, 'error') 
    401401            self.output = None 
     
    411411        operator = self.operator_cbox.GetClientData(pos) 
    412412        try: 
    413             exec "output = data1 %s data2" % operator 
     413            exec("output = data1 %s data2" % operator) 
    414414        except: 
    415415            raise 
     
    532532        self.data2_cbox.SetClientData(pos3, val) 
    533533        dnames = [] 
    534         ids = self._data.keys() 
     534        ids = list(self._data.keys()) 
    535535        for id in ids: 
    536536            if id is not None: 
     
    539539                else: 
    540540                    theory_list = self._data[id].get_theory() 
    541                     theory, _ = theory_list.values()[0] 
     541                    theory, _ = list(theory_list.values())[0] 
    542542                    dnames.append(theory.name) 
    543543        ind = np.argsort(dnames) 
    544544        if len(ind) > 0: 
    545             val_list = np.array(self._data.values())[ind] 
     545            val_list = np.array(list(self._data.values()))[ind] 
    546546            for datastate in val_list: 
    547547                data = datastate.data 
     
    558558                try: 
    559559                    theory_list = datastate.get_theory() 
    560                     for theory, _ in theory_list.values(): 
     560                    for theory, _ in list(theory_list.values()): 
    561561                        th_name = theory.name 
    562562                        posth1 = self.data1_cbox.Append(str(th_name)) 
     
    588588        self.send_warnings('') 
    589589        self.data_namectr.SetBackgroundColour('white') 
    590         state_list = self.get_datalist().values() 
     590        state_list = list(self.get_datalist().values()) 
    591591        name = self.data_namectr.GetValue().strip() 
    592592        name_list = [] 
     
    594594            if state.data is None: 
    595595                theory_list = state.get_theory() 
    596                 theory, _ = theory_list.values()[0] 
     596                theory, _ = list(theory_list.values())[0] 
    597597                d_name = str(theory.name) 
    598598            else: 
     
    896896        list = [] 
    897897        list = self.graph.returnPlottable() 
    898         if len(list.keys()) > 0: 
    899             first_item = list.keys()[0] 
     898        if len(list(list.keys())) > 0: 
     899            first_item = list(list.keys())[0] 
    900900            if first_item.x != []: 
    901901                from sas.sasgui.plottools.PropertyDialog import Properties 
Note: See TracChangeset for help on using the changeset viewer.