Ejemplo n.º 1
0
 def __describe_dict(self,dict_data):
     """Get the description tuple for a dict data object.
     <dict_data> must be a C-library pointer to an enchant dictionary.
     The return value is a tuple of the form:
             (<tag>,<name>,<desc>,<file>)
     """
     # Define local callback function
     cb_result = []
     def cb_func(tag,name,desc,file):
         s = EnchantStr("")
         tag = s.decode(tag)
         name = s.decode(name)
         desc = s.decode(desc)
         file = s.decode(file)
         cb_result.append((tag,name,desc,file))
     # Actually call the describer function
     _e.dict_describe(dict_data,cb_func)
     return cb_result[0]
Ejemplo n.º 2
0
 def __describe_dict(self,dict_data):
     """Get the description tuple for a dict data object.
     <dict_data> must be a C-library pointer to an enchant dictionary.
     The return value is a tuple of the form:
             (<tag>,<name>,<desc>,<file>)
     """
     # Define local callback function
     cb_result = []
     def cb_func(tag,name,desc,file):
         s = EnchantStr("")
         tag = s.decode(tag)
         name = s.decode(name)
         desc = s.decode(desc)
         file = s.decode(file)
         cb_result.append((tag,name,desc,file))
     # Actually call the describer function
     _e.dict_describe(dict_data,cb_func)
     return cb_result[0]
Ejemplo n.º 3
0
    def __describe(self, check_this=True):
        """Return a tuple describing the dictionary.

        This method returns a four-element tuple describing the underlying
        spellchecker system providing the dictionary.  It will contain the
        following strings:

            * language tag
            * name of dictionary provider
            * description of dictionary provider
            * dictionary file

        Direct use of this method is not recommended - instead, access this
        information through the 'tag' and 'provider' attributes.
        """
        if check_this:
            self._check_this()
        _e.dict_describe(self._this, self.__describe_callback)
        return self.__describe_result
Ejemplo n.º 4
0
    def __describe(self,check_this=True):
        """Return a tuple describing the dictionary.
        
        This method returns a four-element tuple describing the underlying
        spellchecker system providing the dictionary.  It will contain the
        following strings:

            * language tag
            * name of dictionary provider
            * description of dictionary provider
            * dictionary file

        Direct use of this method is not recommended - instead, access this
        information through the 'tag' and 'provider' attributes.
        """
        if check_this:
            self._check_this()
        _e.dict_describe(self._this,self.__describe_callback)
        return self.__describe_result