Ignore:
Timestamp:
Nov 15, 2017 4: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/invariant/invariant.py

    • Property mode changed from 100644 to 100755
    r7432acb rfa81e94  
    133133            name = data.__class__.__name__ 
    134134            msg = "Invariant use only Data1D got: [%s] " % str(name) 
    135             raise ValueError, msg 
     135            raise ValueError(msg) 
    136136        self.compute_helper(data=data) 
    137137 
     
    169169                msg += "Please select one.\n" 
    170170                if len(data_list) > 1: 
    171                     from invariant_widgets import DataDialog 
     171                    from .invariant_widgets import DataDialog 
    172172                    dlg = DataDialog(data_list=data_1d_list, text=msg) 
    173173                    if dlg.ShowModal() == wx.ID_OK: 
     
    191191                    self.compute_helper(data) 
    192192                except: 
    193                     msg = "Invariant Set_data: " + str(sys.exc_value) 
     193                    msg = "Invariant Set_data: " + str(sys.exc_info()[1]) 
    194194                    wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 
    195195        else: 
     
    240240            msg = "invariant.save_file: the data being saved is" 
    241241            msg += " not a sas.sascalc.dataloader.data_info.Data1D object" 
    242             raise RuntimeError, msg 
     242            raise RuntimeError(msg) 
    243243 
    244244    def set_state(self, state=None, datainfo=None): 
     
    258258                msg = "invariant.set_state: datainfo parameter cannot" 
    259259                msg += " be None in standalone mode" 
    260                 raise RuntimeError, msg 
     260                raise RuntimeError(msg) 
    261261            # Make sure the user sees the invariant panel after loading 
    262262            # self.parent.set_perspective(self.perspective) 
     
    282282 
    283283        except: 
    284             logger.error("invariant.set_state: %s" % sys.exc_value) 
     284            logger.error("invariant.set_state: %s" % sys.exc_info()[1]) 
    285285 
    286286    def on_set_state_helper(self, event=None): 
     
    320320        else: 
    321321            msg = "Scale can not be zero." 
    322             raise ValueError, msg 
     322            raise ValueError(msg) 
    323323        if len(new_plot.x) == 0: 
    324324            return 
Note: See TracChangeset for help on using the changeset viewer.