sense_hat/stick.py
def _stick_device(self):
        """
        Discovers the filename of the evdev device that represents the Sense
        HAT's joystick.
        """
        for evdev in glob.glob('/sys/class/input/event*'):
            try:
                with io.open(os.path.join(evdev, 'device', 'name'), 'r') as f:
                    if f.read().strip() == self.SENSE_HAT_EVDEV_NAME:
                        return os.path.join('/dev', 'input', os.path.basename(evdev))
            except IOError as e:
                if e.errno != errno.ENOENT:
                    raise
        raise RuntimeError('unable to locate SenseHAT joystick device')

        Discovers the filename of the evdev device that represents the Sense
        HAT's joystick.
        
Discovers the filename of the evdev device that represents the Sense
HAT's joystick.
Discovers the filename of the evdev device that represents the Sense HAT ' s joystick .
def _stick_device(self):
        for evdev in glob.glob('/sys/class/input/event*'):
            try:
                with io.open(os.path.join(evdev, 'device', 'name'), 'r') as f:
                    if f.read().strip() == self.SENSE_HAT_EVDEV_NAME:
                        return os.path.join('/dev', 'input', os.path.basename(evdev))
            except IOError as e:
                if e.errno != errno.ENOENT:
                    raise
        raise RuntimeError('unable to locate SenseHAT joystick device')
def _stick_device ( self ) : for evdev in glob . glob ( '/sys/class/input/event*' ) : try : with io . open ( os . path . join ( evdev , 'device' , 'name' ) , 'r' ) as f : if f . read ( ) . strip ( ) == self . SENSE_HAT_EVDEV_NAME : return os . path . join ( '/dev' , 'input' , os . path . basename ( evdev ) ) except IOError as e : if e . errno != errno . ENOENT : raise raise RuntimeError ( 'unable to locate SenseHAT joystick device' )
Discovers the filename of the evdev device that represents the Sense
HAT's joystick.
Discovers the filename of the evdev device that represents the Sense HAT ' s joystick .
"""
        Discovers the filename of the evdev device that represents the Sense
        HAT's joystick.
        """
self