Changeset b0b09b9 in sasview for src/sas/qtgui/Plotting/Binder.py


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/Plotting/Binder.py

    rdc5ef15 rb0b09b9  
    2424        return self.artist is not other.artist 
    2525 
    26     def __nonzero__(self): 
     26    def __bool__(self): 
    2727        return self.artist is not None 
    2828 
     
    6161            ] 
    6262        except: 
    63             print "bypassing scroll_event: wrong matplotlib version" 
     63            print("bypassing scroll_event: wrong matplotlib version") 
    6464            self._connections = [ 
    6565                canvas.mpl_connect('motion_notify_event', self._onMotion), 
     
    121121            for cid in self._connections: self.canvas.mpl_disconnect(cid) 
    122122        except: 
    123             logging.error("Error disconnection canvas: %s" % sys.exc_value) 
     123            logging.error("Error disconnection canvas: %s" % sys.exc_info()[1]) 
    124124        self._connections = [] 
    125125 
     
    185185        # Check that the trigger is valid 
    186186        if trigger not in self._actions: 
    187             raise ValueError, "%s invalid --- valid triggers are %s"\ 
    188                  % (trigger, ", ".join(self.events)) 
     187            raise ValueError("%s invalid --- valid triggers are %s"\ 
     188                 % (trigger, ", ".join(self.events))) 
    189189 
    190190        # Register the trigger callback 
     
    201201        """ 
    202202        if action not in self.events: 
    203             raise ValueError, "Trigger expects " + ", ".join(self.events) 
     203            raise ValueError("Trigger expects " + ", ".join(self.events)) 
    204204 
    205205        # Tag the event with modifiers 
Note: See TracChangeset for help on using the changeset viewer.