Ignore:
Timestamp:
Oct 11, 2018 12:20:56 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
Children:
98b9f32
Parents:
67ed543
Message:

improved support for py37 in sasgui

File:
1 edited

Legend:

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

    r235f514 r5251ec6  
    77from sas.sascalc.dataloader.loader import Loader 
    88from sas.sascalc.dataloader.data_info import Data2D 
    9 from detector_editor import DetectorDialog 
    10 from collimation_editor import CollimationDialog 
    11 from console import ConsoleDialog 
    129 
    1310from sas.sasgui.guiframe.events import StatusEvent 
     11 
     12from .detector_editor import DetectorDialog 
     13from .collimation_editor import CollimationDialog 
     14from .console import ConsoleDialog 
     15 
    1416 
    1517 
     
    397399        if data is None: 
    398400            return 
    399         from sample_editor import SampleDialog 
     401        from .sample_editor import SampleDialog 
    400402        dlg = SampleDialog(parent=self, sample=data.sample) 
    401403        dlg.set_manager(self) 
     
    409411        if data is None: 
    410412            return 
    411         from source_editor import SourceDialog 
     413        from .source_editor import SourceDialog 
    412414        dlg = SourceDialog(parent=self, source=data.source) 
    413415        dlg.set_manager(self) 
     
    426428        wlist = '|'.join(cards) 
    427429 
    428         dlg = wx.FileDialog(self, "Choose a file", location, "", wlist, wx.OPEN) 
     430        dlg = wx.FileDialog(self, "Choose a file", location, "", wlist, wx.FD_OPEN) 
    429431        if dlg.ShowModal() == wx.ID_OK: 
    430432            path = dlg.GetPath() 
     
    527529        try: 
    528530            #Load data 
    529             from load_thread import DataReader 
     531            from .load_thread import DataReader 
    530532            ## If a thread is already started, stop it 
    531533            if self.reader is not None and self.reader.isrunning(): 
     
    535537                                    updatefn=None) 
    536538            self.reader.queue() 
    537         except: 
    538             msg = "Data Editor: %s" % (sys.exc_value) 
     539        except Exception as exc: 
     540            msg = "Data Editor: %s" % exc 
    539541            load_error(msg) 
    540542            return 
Note: See TracChangeset for help on using the changeset viewer.