(self)
Verify that an uinput device exists and is readable and writable
        by the current process.
Verify that an uinput device exists and is readable and writable
        by the current process.
Verify that an uinput device exists and is readable and writable by the current process .
def _verify(self):
        '''
        Verify that an uinput device exists and is readable and writable
        by the current process.
        '''

        try:
            m = os.stat(self.devnode)[stat.ST_MODE]
            if not stat.S_ISCHR(m):
                raise
        except (IndexError, OSError):
            msg = '"{}" does not exist or is not a character device file '\
                  '- verify that the uinput module is loaded'
            raise UInputError(msg.format(self.devnode))

        if not os.access(self.devnode, os.W_OK):
            msg = '"{}" cannot be opened for writing'
            raise UInputError(msg.format(self.devnode))

        if len(self.name) > _uinput.maxnamelen:
            msg = 'uinput device name must not be longer than {} characters'
            raise UInputError(msg.format(_uinput.maxnamelen))
def _verify ( self ) : try : m = os . stat ( self . devnode ) [ stat . ST_MODE ] if not stat . S_ISCHR ( m ) : raise except ( IndexError , OSError ) : msg = '"{}" does not exist or is not a character device file ' '- verify that the uinput module is loaded' raise UInputError ( msg . format ( self . devnode ) ) if not os . access ( self . devnode , os . W_OK ) : msg = '"{}" cannot be opened for writing' raise UInputError ( msg . format ( self . devnode ) ) if len ( self . name ) > _uinput . maxnamelen : msg = 'uinput device name must not be longer than {} characters' raise UInputError ( msg . format ( _uinput . maxnamelen ) )