Ignore:
Timestamp:
Apr 10, 2017 5:14:32 AM (7 years ago)
Author:
Tim Snow <tim.snow@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7b15990
Parents:
fe09e9b (diff), d26f025 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into sld-calculator-mod

Location:
src/sas/sasgui/perspectives/calculator
Files:
12 edited

Legend:

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

    r959eb01 r235f514  
    9393        Edit meta data 
    9494        """ 
    95         if self.data_edit_frame == None: 
     95        if self.data_edit_frame is None: 
    9696            self.data_edit_frame = DataEditorWindow(parent=self.parent, 
    9797                                                    manager=self, data=[], 
     
    106106        Data operation 
    107107        """ 
    108         if self.data_operator_frame == None: 
     108        if self.data_operator_frame is None: 
    109109            # Use one frame all the time 
    110110            self.data_operator_frame = DataOperatorWindow(parent=self.parent, 
     
    121121        Compute the Kiessig thickness 
    122122        """ 
    123         if self.kiessig_frame == None: 
     123        if self.kiessig_frame is None: 
    124124            frame = KiessigWindow(parent=self.parent, manager=self) 
    125125            self.put_icon(frame) 
     
    133133        Compute the scattering length density of molecula 
    134134        """ 
    135         if self.sld_frame == None: 
     135        if self.sld_frame is None: 
    136136            frame = SldWindow(parent=self.parent, 
    137137                                  base=self.parent, manager=self) 
     
    146146        Compute the mass density or molar voulme 
    147147        """ 
    148         if self.cal_md_frame == None: 
     148        if self.cal_md_frame is None: 
    149149            frame = DensityWindow(parent=self.parent, 
    150150                                  base=self.parent, manager=self) 
     
    159159        Compute the slit size a given data 
    160160        """ 
    161         if self.cal_slit_frame == None: 
     161        if self.cal_slit_frame is None: 
    162162            frame = SlitLengthCalculatorWindow(parent=self.parent, manager=self) 
    163163            self.put_icon(frame) 
     
    171171        Estimate the instrumental resolution 
    172172        """ 
    173         if self.cal_res_frame == None: 
     173        if self.cal_res_frame is None: 
    174174            frame = ResolutionWindow(parent=self.parent, manager=self) 
    175175            self.put_icon(frame) 
     
    183183        On Generic model menu event 
    184184        """ 
    185         if self.gen_frame == None: 
     185        if self.gen_frame is None: 
    186186            frame = SasGenWindow(parent=self.parent, manager=self) 
    187187            self.put_icon(frame) 
     
    214214        :param filename: file name to open in editor 
    215215        """ 
    216         if self.py_frame == None: 
     216        if self.py_frame is None: 
    217217            frame = PyConsole(parent=self.parent, base=self, 
    218218                              filename=filename) 
  • src/sas/sasgui/perspectives/calculator/data_editor.py

    r959eb01 r235f514  
    419419        """ 
    420420        path = None 
    421         if location == None: 
     421        if location is None: 
    422422            location = os.getcwd() 
    423423 
  • src/sas/sasgui/perspectives/calculator/data_operator.py

    r959eb01 r7432acb  
    182182        On data name typing 
    183183        """ 
    184         if event != None: 
     184        if event is not None: 
    185185            event.Skip() 
    186186        item = event.GetEventObject() 
     
    198198        self.send_warnings('') 
    199199        msg = '' 
    200         if name == None: 
     200        if name is None: 
    201201            text = self.data_namectr.GetValue().strip() 
    202202        else: 
     
    205205        name_list = [] 
    206206        for state in state_list: 
    207             if state.data == None: 
     207            if state.data is None: 
    208208                theory_list = state.get_theory() 
    209209                theory, _ = theory_list.values()[0] 
     
    264264        self.put_text_pic(self.data2_pic, content=str(val)) 
    265265        self.check_data_inputs() 
    266         if self.output != None: 
     266        if self.output is not None: 
    267267            self.output.name = str(self.data_namectr.GetValue()) 
    268268        self.draw_output(self.output) 
     
    278278        pos = item.GetCurrentSelection() 
    279279        data = item.GetClientData(pos) 
    280         if data == None: 
     280        if data is None: 
    281281            content = "?" 
    282282            self.put_text_pic(self.data1_pic, content) 
     
    284284            self.data1_pic.add_image(data) 
    285285        self.check_data_inputs() 
    286         if self.output != None: 
     286        if self.output is not None: 
    287287            self.output.name = str(self.data_namectr.GetValue()) 
    288288        self.draw_output(self.output) 
     
    297297        self.put_text_pic(self.operator_pic, content=text) 
    298298        self.check_data_inputs() 
    299         if self.output != None: 
     299        if self.output is not None: 
    300300            self.output.name = str(self.data_namectr.GetValue()) 
    301301        self.draw_output(self.output) 
     
    313313        content = "?" 
    314314        if not (self.numberctr.IsShown() and self.numberctr.IsEnabled()): 
    315             if data == None: 
     315            if data is None: 
    316316                content = "?" 
    317317                self.put_text_pic(self.data2_pic, content) 
     
    329329                data = None 
    330330            item.SetClientData(pos, data) 
    331             if data != None: 
     331            if data is not None: 
    332332                self.check_data_inputs() 
    333333 
    334334            self.put_text_pic(self.data2_pic, content) 
    335335 
    336         if self.output != None: 
     336        if self.output is not None: 
    337337            self.output.name = str(self.data_namectr.GetValue()) 
    338338        self.draw_output(self.output) 
     
    355355        pos1 = self.data1_cbox.GetCurrentSelection() 
    356356        data1 = self.data1_cbox.GetClientData(pos1) 
    357         if data1 == None: 
     357        if data1 is None: 
    358358            self.output = None 
    359359            return flag 
     
    361361        data2 = self.data2_cbox.GetClientData(pos2) 
    362362 
    363         if data2 == None: 
     363        if data2 is None: 
    364364            self.output = None 
    365365            return flag 
     
    422422        """ 
    423423        out = self.out_pic 
    424         if output == None: 
     424        if output is None: 
    425425            content = "?" 
    426426            self.put_text_pic(out, content) 
     
    472472        On Focus at this window 
    473473        """ 
    474         if event != None: 
     474        if event is not None: 
    475475            event.Skip() 
    476476        self._data = self.get_datalist() 
     
    534534        ids = self._data.keys() 
    535535        for id in ids: 
    536             if id != None: 
    537                 if self._data[id].data != None: 
     536            if id is not None: 
     537                if self._data[id].data is not None: 
    538538                    dnames.append(self._data[id].data.name) 
    539539                else: 
     
    546546            for datastate in val_list: 
    547547                data = datastate.data 
    548                 if data != None: 
     548                if data is not None: 
    549549                    name = data.name 
    550550                    pos1 = self.data1_cbox.Append(str(name)) 
     
    577577        """ 
    578578        data_manager = self.parent.parent.get_data_manager() 
    579         if data_manager != None: 
     579        if data_manager is not None: 
    580580            return  data_manager.get_all_data() 
    581581        else: 
     
    592592        name_list = [] 
    593593        for state in state_list: 
    594             if state.data == None: 
     594            if state.data is None: 
    595595                theory_list = state.get_theory() 
    596596                theory, _ = theory_list.values()[0] 
     
    609609            wx.MessageBox(msg, 'Error') 
    610610            return 
    611         if self.output == None: 
     611        if self.output is None: 
    612612            msg = "No Output Data has been generated...   " 
    613613            wx.MessageBox(msg, 'Error') 
     
    983983        On close event 
    984984        """ 
    985         if self.manager != None: 
     985        if self.manager is not None: 
    986986            self.manager.data_operator_frame = None 
    987987        self.panel.disconnect_panels() 
  • src/sas/sasgui/perspectives/calculator/density_panel.py

    r959eb01 r7432acb  
    239239        update units and output combobox 
    240240        """ 
    241         if event == None: 
     241        if event is None: 
    242242            return 
    243243        event.Skip() 
     
    257257        update units and input combobox 
    258258        """ 
    259         if event == None: 
     259        if event is None: 
    260260            return 
    261261        event.Skip() 
     
    438438        On close event 
    439439        """ 
    440         if self.manager != None: 
     440        if self.manager is not None: 
    441441            self.manager.cal_md_frame = None 
    442442        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py

    r959eb01 r7432acb  
    6161    Add icon in the frame 
    6262    """ 
    63     if parent != None: 
     63    if parent is not None: 
    6464        if hasattr(frame, "IsIconized"): 
    6565            if not frame.IsIconized(): 
     
    7474    Set_error dialog 
    7575    """ 
    76     if item != None: 
     76    if item is not None: 
    7777        item.SetBackgroundColour("pink") 
    7878        item.Refresh() 
    7979    if show_msg: 
    8080        msg = "Error: wrong (or out of range) value entered." 
    81         if panel.parent.parent != None: 
     81        if panel.parent.parent is not None: 
    8282            wx.PostEvent(panel.parent.parent, 
    8383                     StatusEvent(status=msg, info='Error')) 
     
    425425        """ 
    426426        unit = 'sec' 
    427         if self.time_text != None: 
     427        if self.time_text is not None: 
    428428            self.time_text.SetForegroundColour('black') 
    429429            etime = self.estimate_ctime() 
     
    487487        path = None 
    488488        filename = '' 
    489         if location == None: 
     489        if location is None: 
    490490            location = os.getcwd() 
    491491 
     
    633633        self.model.set_sld_data(self.sld_data) 
    634634 
    635         self.draw_button.Enable(self.sld_data != None) 
     635        self.draw_button.Enable(self.sld_data is not None) 
    636636        wx.CallAfter(self.parent.set_sld_data, self.sld_data) 
    637637        self._update_model_params() 
     
    855855        """ 
    856856        flag = self.parent.check_omfpanel_inputs() 
    857         if not flag and self.parent.parent != None: 
     857        if not flag and self.parent.parent is not None: 
    858858            infor = 'Error' 
    859859            msg = 'Error: Wrong inputs in the SLD info panel.' 
     
    864864            return 
    865865        self.sld_data = self.parent.get_sld_from_omf() 
    866         if self.sld_data == None: 
    867             if self.parent.parent != None: 
     866        if self.sld_data is None: 
     867            if self.parent.parent is not None: 
    868868                infor = 'Error' 
    869869                msg = 'Error: No data has been selected.' 
     
    880880            self.model.set_sld_data(self.sld_data) 
    881881            self.set_input_params() 
    882             if self.is_avg or self.is_avg == None: 
     882            if self.is_avg or self.is_avg is None: 
    883883                self._create_default_1d_data() 
    884884                i_out = np.zeros(len(self.data.y)) 
     
    971971        self.bt_compute.SetLabel(label) 
    972972        self.bt_compute.SetToolTipString(label) 
    973         if self.parent.parent != None: 
     973        if self.parent.parent is not None: 
    974974            wx.PostEvent(self.parent.parent, 
    975975                             StatusEvent(status=msg, type=type)) 
     
    979979        Update the progress bar 
    980980        """ 
    981         if self.parent.parent == None: 
     981        if self.parent.parent is None: 
    982982            return 
    983983        type = "progress" 
     
    995995        for ind in range(len(input[0])): 
    996996            if self.is_avg: 
    997                 if ind % 1 == 0 and update != None: 
     997                if ind % 1 == 0 and update is not None: 
    998998                    update() 
    999999                    time.sleep(0.1) 
     
    10021002                out = np.append(out, outi) 
    10031003            else: 
    1004                 if ind % 50 == 0  and update != None: 
     1004                if ind % 50 == 0  and update is not None: 
    10051005                    update() 
    10061006                    time.sleep(0.001) 
     
    10101010                out = np.append(out, outi) 
    10111011        #print time.time() - s 
    1012         if self.is_avg or self.is_avg == None: 
     1012        if self.is_avg or self.is_avg is None: 
    10131013            self._draw1D(out) 
    10141014        else: 
     
    11511151        new_plot.label = new_plot.id 
    11521152        #theory_data = deepcopy(new_plot) 
    1153         if self.parent.parent != None: 
     1153        if self.parent.parent is not None: 
    11541154            self.parent.parent.update_theory(data_id=new_plot.id, 
    11551155                                           theory=new_plot, 
     
    12101210        new_plot.label = new_plot.id 
    12111211        #theory_data = deepcopy(new_plot) 
    1212         if self.parent.parent != None: 
     1212        if self.parent.parent is not None: 
    12131213            self.parent.parent.update_theory(data_id=data.id, 
    12141214                                           theory=new_plot, 
     
    12871287            key_low = key.lower() 
    12881288            if key_low.count('mx') > 0: 
    1289                 if sld_sets[key] == None: 
     1289                if sld_sets[key] is None: 
    12901290                    sld_sets[key] = self.sld_data.sld_mx 
    12911291                mx = sld_sets[key] 
    12921292            elif key_low.count('my') > 0: 
    1293                 if sld_sets[key] == None: 
     1293                if sld_sets[key] is None: 
    12941294                    sld_sets[key] = self.sld_data.sld_my 
    12951295                my = sld_sets[key] 
    12961296            elif key_low.count('mz') > 0: 
    1297                 if sld_sets[key] == None: 
     1297                if sld_sets[key] is None: 
    12981298                    sld_sets[key] = self.sld_data.sld_mz 
    12991299                mz = sld_sets[key] 
    13001300            else: 
    1301                 if sld_sets[key] != None: 
     1301                if sld_sets[key] is not None: 
    13021302                    self.sld_data.set_sldn(sld_sets[key]) 
    13031303        self.sld_data.set_sldms(mx, my, mz) 
     
    13471347            infor = 'Error' 
    13481348            #logger.error(msg) 
    1349             if self.parent.parent != None: 
     1349            if self.parent.parent is not None: 
    13501350                # inform msg to wx 
    13511351                wx.PostEvent(self.parent.parent, 
     
    13681368        """ 
    13691369 
    1370         if omfdata == None: 
     1370        if omfdata is None: 
    13711371            self._set_none_text() 
    13721372            return 
     
    14371437        self.slds = [] 
    14381438        omfdata = self.sld_data 
    1439         if omfdata == None: 
     1439        if omfdata is None: 
    14401440            raise 
    14411441        sld_key_list = self._get_slds_key_list(omfdata) 
     
    14771477        self.nodes = [] 
    14781478        omfdata = self.sld_data 
    1479         if omfdata == None: 
     1479        if omfdata is None: 
    14801480            raise 
    14811481        key_list = self._get_nodes_key_list(omfdata) 
     
    15121512        self.stepsize = [] 
    15131513        omfdata = self.sld_data 
    1514         if omfdata == None: 
     1514        if omfdata is None: 
    15151515            raise 
    15161516        key_list = self._get_step_key_list(omfdata) 
     
    16311631        Set sld textctrls 
    16321632        """ 
    1633         if sld_data == None: 
     1633        if sld_data is None: 
    16341634            for ctr_list in self.slds: 
    16351635                ctr_list[1].Enable(False) 
     
    16901690            data = self.parent.get_sld_data() 
    16911691            fName = os.path.splitext(path)[0] + '.' + extension.split('.')[-1] 
    1692             if data != None: 
     1692            if data is not None: 
    16931693                try: 
    16941694                    reader.write(fName, data) 
     
    16991699                infor = 'Error' 
    17001700                #logger.error(msg) 
    1701                 if self.parent.parent != None: 
     1701                if self.parent.parent is not None: 
    17021702                    # inform msg to wx 
    17031703                    wx.PostEvent(self.parent.parent, 
     
    17081708            msg = "Error occurred while saving. " 
    17091709            infor = 'Error' 
    1710             if self.parent.parent != None: 
     1710            if self.parent.parent is not None: 
    17111711                # inform msg to wx 
    17121712                wx.PostEvent(self.parent.parent, 
     
    17181718        """ 
    17191719        flag = True 
    1720         if event != None: 
     1720        if event is not None: 
    17211721            event.Skip() 
    17221722            ctl = event.GetEventObject() 
     
    17391739            if npts > 0: 
    17401740                nop = self.set_npts_from_slddata() 
    1741                 if nop == None: 
     1741                if nop is None: 
    17421742                    nop = npts 
    17431743                self.display_npts(nop) 
     
    17581758        """ 
    17591759        flag = True 
    1760         if event != None: 
     1760        if event is not None: 
    17611761            event.Skip() 
    17621762            ctl = event.GetEventObject() 
     
    19111911        Set omfdata 
    19121912        """ 
    1913         if data == None: 
     1913        if data is None: 
    19141914            return 
    19151915        self.sld_data = data 
    1916         enable = (not data == None) 
     1916        enable = (data is not None) 
    19171917        self._set_omfpanel_sld_data(self.sld_data) 
    19181918        self.omfpanel.bt_save.Enable(enable) 
     
    19741974        Send full draw to gui frame 
    19751975        """ 
    1976         if self.parent != None: 
     1976        if self.parent is not None: 
    19771977            self.parent.set_schedule_full_draw(panel, func) 
    19781978 
     
    20502050        Close 
    20512051        """ 
    2052         if self.base != None: 
     2052        if self.base is not None: 
    20532053            self.base.gen_frame = None 
    20542054        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/image_viewer.py

    r959eb01 r7432acb  
    7070                plot_frame.SetTitle('Picture -- %s --' % basename) 
    7171                plot_frame.Show(True) 
    72                 if parent != None: 
     72                if parent is not None: 
    7373                    parent.put_icon(plot_frame) 
    7474            except: 
     
    8585        """ 
    8686        path = None 
    87         if location == None: 
     87        if location is None: 
    8888            location = os.getcwd() 
    8989        dlg = wx.FileDialog(self.parent, "Image Viewer: Choose a image file", 
     
    403403        output.is_data = True 
    404404        output = reader2D_converter(output) 
    405         if self.base != None: 
     405        if self.base is not None: 
    406406            data = self.base.create_gui_data(output, self.title) 
    407407            self.base.add_data({data.id:data}) 
  • src/sas/sasgui/perspectives/calculator/kiessig_calculator_panel.py

    r959eb01 r7432acb  
    190190        """ 
    191191        # skip for another event 
    192         if event != None: 
     192        if event is not None: 
    193193            event.Skip() 
    194194        dq = self.dq_name_tcl.GetValue() 
     
    237237        Close event 
    238238        """ 
    239         if self.manager != None: 
     239        if self.manager is not None: 
    240240            self.manager.kiessig_frame = None 
    241241        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    r959eb01 r7432acb  
    387387        self._msg_box.SetLabel(msg) 
    388388        self._msg_box.SetForegroundColour(color) 
    389         if self.parent.parent != None: 
     389        if self.parent.parent is not None: 
    390390            from sas.sasgui.guiframe.events import StatusEvent 
    391391            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, 
     
    478478        """ 
    479479        # For Mac 
    480         if event != None: 
     480        if event is not None: 
    481481            event.Skip() 
    482482        item = event.GetEventObject() 
     
    979979 
    980980        # Prepare the messagebox 
    981         if self.base != None and not msg: 
     981        if self.base is not None and not msg: 
    982982            self.base.update_custom_combo() 
    983983            # Passed exception in import test as it will fail for sasmodels.sasview_model class 
     
    10021002        self._msg_box.SetForegroundColour(color) 
    10031003        # Send msg to the top window 
    1004         if self.base != None: 
     1004        if self.base is not None: 
    10051005            from sas.sasgui.guiframe.events import StatusEvent 
    10061006            wx.PostEvent(self.base.parent, 
     
    11901190        """ 
    11911191        self.Show(False) 
    1192         #if self.parent != None: 
     1192        #if self.parent is not None: 
    11931193        #    self.parent.new_model_frame = None 
    11941194        #self.Destroy() 
     
    13881388 
    13891389    def _get_upper_name(self, name=None): 
    1390         if name == None: 
     1390        if name is None: 
    13911391            return "" 
    13921392        upper_name = "" 
  • src/sas/sasgui/perspectives/calculator/pyconsole.py

    rddbac66 r7432acb  
    118118        self.panel = panel 
    119119        self._add_menu() 
    120         if filename != None: 
     120        if filename is not None: 
    121121            dataDir = os.path.dirname(filename) 
    122         elif self.parent != None: 
     122        elif self.parent is not None: 
    123123            dataDir = self.parent._default_save_location 
    124124        else: 
     
    128128 
    129129        # See if there is a corresponding C file 
    130         if filename != None: 
     130        if filename is not None: 
    131131            c_filename = os.path.splitext(filename)[0] + ".c" 
    132132            if os.path.isfile(c_filename): 
     
    244244 
    245245        # See if there is a corresponding C file 
    246         if result.path != None: 
     246        if result.path is not None: 
    247247            c_filename = os.path.splitext(result.path)[0] + ".c" 
    248248            if os.path.isfile(c_filename): 
     
    303303 
    304304        # Update plugin model list in fitpage combobox 
    305         if success and self._manager != None and self.panel != None: 
     305        if success and self._manager is not None and self.panel is not None: 
    306306            self._manager.set_edit_menu_helper(self.parent) 
    307307            wx.CallAfter(self._manager.update_custom_combo) 
     
    337337        Close event 
    338338        """ 
    339         if self.base != None: 
     339        if self.base is not None: 
    340340            self.base.py_frame = None 
    341341        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py

    r959eb01 r7432acb  
    656656            event.Skip() 
    657657        # Clear the plot 
    658         if self.image != None: 
     658        if self.image is not None: 
    659659            self.image.clf() 
    660660            # reset image 
     
    674674        """ 
    675675        # Skip event for next event 
    676         if event != None: 
     676        if event is not None: 
    677677            event.Skip() 
    678678            msg = "Please Check your input values " 
     
    708708            # Validate the wave inputs 
    709709            wave_input = self._validate_q_input(wavelength, wavelength_spread) 
    710             if wave_input != None: 
     710            if wave_input is not None: 
    711711                wavelength, wavelength_spread = wave_input 
    712712 
     
    757757        # Validate the q inputs 
    758758        q_input = self._validate_q_input(self.qx, self.qy) 
    759         if q_input != None: 
     759        if q_input is not None: 
    760760            self.qx, self.qy = q_input 
    761761 
     
    769769 
    770770        # Compute the resolution 
    771         if self.image != None: 
     771        if self.image is not None: 
    772772            #_pylab_helpers.Gcf.set_active(self.fm) 
    773773            _pylab_helpers.Gcf.figs = {} 
     
    839839        : Param image: pylab object 
    840840        """ 
    841         if image == None: 
     841        if image is None: 
    842842            return 
    843843        if color == 'g': 
     
    973973        if len(qx) != len(qy): 
    974974            return None 
    975         if qx == None or qy == None: 
     975        if qx is None or qy is None: 
    976976            return None 
    977977        return qx, qy 
     
    982982        """ 
    983983        # skip for another event 
    984         if event != None: 
     984        if event is not None: 
    985985            event.Skip() 
    986986        # init resolution_calculator 
     
    11481148        Set the detector coordinate for sigmas to x-y coordinate 
    11491149        """ 
    1150         if event != None: 
     1150        if event is not None: 
    11511151            event.Skip() 
    11521152        # Set the coordinate in Cartesian 
     
    11601160        Set the detector coordinate for sigmas to polar coordinate 
    11611161        """ 
    1162         if event != None: 
     1162        if event is not None: 
    11631163            event.Skip() 
    11641164        # Set the coordinate in polar 
     
    11811181        self.compute_button.SetLabel(label) 
    11821182        self.compute_button.SetToolTipString(label) 
    1183         if self.parent.parent != None: 
     1183        if self.parent.parent is not None: 
    11841184            wx.PostEvent(self.parent.parent, 
    11851185                         StatusEvent(status=msg, type=type)) 
     
    11961196        On source combobox selection 
    11971197        """ 
    1198         if event != None: 
     1198        if event is not None: 
    11991199            combo = event.GetEventObject() 
    12001200            event.Skip() 
     
    12151215        On source color combobox selection 
    12161216        """ 
    1217         if event != None: 
     1217        if event is not None: 
    12181218            #combo = event.GetEventObject() 
    12191219            event.Skip() 
     
    12531253        On spectrum ComboBox event 
    12541254        """ 
    1255         if event != None: 
     1255        if event is not None: 
    12561256            #combo = event.GetEventObject() 
    12571257            event.Skip() 
     
    12611261        if selection == 'Add new': 
    12621262            path = self._selectDlg() 
    1263             if path == None: 
     1263            if path is None: 
    12641264                self.spectrum_cb.SetValue('Flat') 
    12651265                self.resolution.set_spectrum(self.spectrum_dic['Flat']) 
     
    13011301        """ 
    13021302        try: 
    1303             if path == None: 
     1303            if path is None: 
    13041304                wx.PostEvent(self.parent.parent, StatusEvent(status=\ 
    13051305                            " Selected Distribution was not loaded: %s" % path)) 
     
    13481348        """ 
    13491349        _pylab_helpers.Gcf.figs = {} 
    1350         if self.manager != None: 
     1350        if self.manager is not None: 
    13511351            self.manager.cal_res_frame = None 
    13521352        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/sld_panel.py

    rfe09e9b r2d220dd  
    550550        On close event 
    551551        """ 
    552         if self.manager != None: 
     552        if self.manager is not None: 
    553553            self.manager.sld_frame = None 
    554554        self.Destroy() 
  • src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py

    rd0248bd r7432acb  
    157157        path = None 
    158158        filename = '' 
    159         if location == None: 
     159        if location is None: 
    160160            location = os.getcwd() 
    161161 
     
    303303        Close event 
    304304        """ 
    305         if self.manager != None: 
     305        if self.manager is not None: 
    306306            self.manager.cal_slit_frame = None 
    307307        self.Destroy() 
Note: See TracChangeset for help on using the changeset viewer.