Ignore:
Timestamp:
Oct 26, 2017 3:13:05 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:
895e7359
Parents:
def64a0
Message:

Initial changes to make SasView? run with python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/DataOperationUtilityPanel.py

    • Property mode changed from 100644 to 100755
    r7d9c83c rb0b09b9  
    1313import sas.qtgui.Utilities.GuiUtils as GuiUtils 
    1414 
    15 from UI.DataOperationUtilityUI import Ui_DataOperationUtility 
     15from .UI.DataOperationUtilityUI import Ui_DataOperationUtility 
    1616 
    1717BG_WHITE = "background-color: rgb(255, 255, 255);" 
     
    7676        self.filenames = filenames 
    7777 
    78         if filenames.keys(): 
     78        if list(filenames.keys()): 
    7979            # clear contents of comboboxes 
    8080            self.cbData1.clear() 
     
    8585            list_datafiles = [] 
    8686 
    87             for key_id in filenames.keys(): 
     87            for key_id in list(filenames.keys()): 
    8888                if filenames[key_id].get_data().title: 
    8989                    # filenames with titles 
     
    139139            data1 = self.data1 
    140140            data2 = self.data2 
    141             exec "output = data1 %s data2" % operator 
     141            exec("output = data1 %s data2" % operator) 
    142142        except: 
    143143            raise 
     
    300300                self.cbData1.setStyleSheet(QtCore.QString(BG_RED)) 
    301301                self.cbData2.setStyleSheet(QtCore.QString(BG_RED)) 
    302                 print self.data1.__class__.__name__ != self.data2.__class__.__name__ 
     302                print(self.data1.__class__.__name__ != self.data2.__class__.__name__) 
    303303                logging.warning('Cannot compute data of different dimensions') 
    304304                return False 
     
    354354    def _findId(self, name): 
    355355        """ find id of name in list of filenames """ 
    356         isinstance(name, basestring) 
    357  
    358         for key_id in self.filenames.keys(): 
     356        isinstance(name, str) 
     357 
     358        for key_id in list(self.filenames.keys()): 
    359359            # data with title 
    360360            if self.filenames[key_id].get_data().title: 
Note: See TracChangeset for help on using the changeset viewer.