Changeset fa81e94 in sasview for src/sas/sasgui/plottools/binder.py


Ignore:
Timestamp:
Nov 15, 2017 2:33:09 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:
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/plottools/binder.py

    • Property mode changed from 100644 to 100755
    ra1b8fee rfa81e94  
    22Extension to MPL to support the binding of artists to key/mouse events. 
    33""" 
    4 from __future__ import print_function 
     4 
    55 
    66import sys 
     
    2828        return self.artist is not other.artist 
    2929 
    30     def __nonzero__(self): 
     30    def __bool__(self): 
    3131        return self.artist is not None 
    3232 
     
    125125            for cid in self._connections: self.canvas.mpl_disconnect(cid) 
    126126        except: 
    127             logger.error("Error disconnection canvas: %s" % sys.exc_value) 
     127            logger.error("Error disconnection canvas: %s" % sys.exc_info()[1]) 
    128128        self._connections = [] 
    129129 
     
    189189        # Check that the trigger is valid 
    190190        if trigger not in self._actions: 
    191             raise ValueError, "%s invalid --- valid triggers are %s"\ 
    192                  % (trigger, ", ".join(self.events)) 
     191            raise ValueError("%s invalid --- valid triggers are %s"\ 
     192                 % (trigger, ", ".join(self.events))) 
    193193 
    194194        # Register the trigger callback 
     
    205205        """ 
    206206        if action not in self.events: 
    207             raise ValueError, "Trigger expects " + ", ".join(self.events) 
     207            raise ValueError("Trigger expects " + ", ".join(self.events)) 
    208208 
    209209        # Tag the event with modifiers 
Note: See TracChangeset for help on using the changeset viewer.