Ignore:
Timestamp:
Oct 11, 2018 2: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/simulation/ShapeParameters.py

    ra1b8fee r5251ec6  
    1010from __future__ import print_function 
    1111 
     12import sys 
     13from copy import deepcopy 
     14 
    1215import wx 
    13 import sys 
    1416import wx.lib.newevent 
    15 from copy import deepcopy 
    16 import SimCanvas 
     17 
     18from . import SimCanvas 
    1719 
    1820(CreateShapeEvent, EVT_ADD_SHAPE) = wx.lib.newevent.NewEvent() 
     
    201203            n = 1 
    202204            self.parameters = [] 
    203             keys = shape.params.keys() 
    204             keys.sort() 
    205              
    206             for item in keys: 
     205             
     206            for item in sorted(shape.params.keys()): 
    207207                if item in ['contrast', 'order']: 
    208208                    continue 
     
    393393                if not tmp==None: 
    394394                    self.current_shape.params[item[0]] = tmp  
    395         except: 
     395        except Exception as exc: 
    396396            print("Could not create") 
    397             print(sys.exc_value) 
     397            print(exc) 
    398398                 
    399399    def _onCreate(self, evt): 
     
    489489            print("NOT YET IMPLMENTED") 
    490490            print("renaming", self.shape_listbox.GetString(indices[0])) 
    491                  
Note: See TracChangeset for help on using the changeset viewer.