def set_enabled(self, enabled):
        """
        Enables or disables the Button.

        Args:
            enabled (bool): If true te button is enabled and so the user can press it.
        """
        if enabled:
            try:
                del self.attributes['disabled']
            except __HOLE__:
                pass
        else:
            self.attributes['disabled'] = None
dataset/ETHPy150Open dddomodossola/remi/remi/gui.py/Button.set_enabled