Changeset fa81e94 in sasview for src/sas/sasgui/perspectives/calculator/data_operator.py
- Timestamp:
- Nov 15, 2017 2:33:09 AM (7 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/data_operator.py
- Property mode changed from 100644 to 100755
r7432acb rfa81e94 202 202 else: 203 203 text = name 204 state_list = self.get_datalist().values()204 state_list = list(self.get_datalist().values()) 205 205 name_list = [] 206 206 for state in state_list: 207 207 if state.data is None: 208 208 theory_list = state.get_theory() 209 theory, _ = theory_list.values()[0]209 theory, _ = list(theory_list.values())[0] 210 210 d_name = str(theory.name) 211 211 else: … … 397 397 self._set_textctrl_color(self.data1_cbox, 'pink') 398 398 self._set_textctrl_color(self.data2_cbox, 'pink') 399 msg = "DataOperation: %s" % sys.exc_ value399 msg = "DataOperation: %s" % sys.exc_info()[1] 400 400 self.send_warnings(msg, 'error') 401 401 self.output = None … … 411 411 operator = self.operator_cbox.GetClientData(pos) 412 412 try: 413 exec "output = data1 %s data2" % operator413 exec("output = data1 %s data2" % operator) 414 414 except: 415 415 raise … … 532 532 self.data2_cbox.SetClientData(pos3, val) 533 533 dnames = [] 534 ids = self._data.keys()534 ids = list(self._data.keys()) 535 535 for id in ids: 536 536 if id is not None: … … 539 539 else: 540 540 theory_list = self._data[id].get_theory() 541 theory, _ = theory_list.values()[0]541 theory, _ = list(theory_list.values())[0] 542 542 dnames.append(theory.name) 543 543 ind = np.argsort(dnames) 544 544 if len(ind) > 0: 545 val_list = np.array( self._data.values())[ind]545 val_list = np.array(list(self._data.values()))[ind] 546 546 for datastate in val_list: 547 547 data = datastate.data … … 558 558 try: 559 559 theory_list = datastate.get_theory() 560 for theory, _ in theory_list.values():560 for theory, _ in list(theory_list.values()): 561 561 th_name = theory.name 562 562 posth1 = self.data1_cbox.Append(str(th_name)) … … 588 588 self.send_warnings('') 589 589 self.data_namectr.SetBackgroundColour('white') 590 state_list = self.get_datalist().values()590 state_list = list(self.get_datalist().values()) 591 591 name = self.data_namectr.GetValue().strip() 592 592 name_list = [] … … 594 594 if state.data is None: 595 595 theory_list = state.get_theory() 596 theory, _ = theory_list.values()[0]596 theory, _ = list(theory_list.values())[0] 597 597 d_name = str(theory.name) 598 598 else: … … 896 896 list = [] 897 897 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] 900 900 if first_item.x != []: 901 901 from sas.sasgui.plottools.PropertyDialog import Properties
Note: See TracChangeset
for help on using the changeset viewer.