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


Ignore:
Timestamp:
Nov 9, 2017 8:41:54 AM (6 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:
cee5c78
Parents:
749b715
git-author:
Piotr Rozyczko <rozyczko@…> (10/26/17 03:13:05)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:54)
Message:

Initial changes to make SasView? run with python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/Binder.py

    rdc5ef15 rb3e8629  
    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.