Example #1
0
    def _request_dict_data(self,tag):
        """Request raw C pointer data for a dictionary.

        This method call passes on the call to the C library, and does
        some internal bookkeeping.
        """
        self._check_this()
        tag = EnchantStr(tag)
        new_dict = _e.broker_request_dict(self._this,tag.encode())
        if new_dict is None:
            eStr = "Dictionary for language '%s' could not be found"
            self._raise_error(eStr % (tag,),DictNotFoundError)
        return new_dict
Example #2
0
    def _request_dict_data(self, tag):
        """Request raw C pointer data for a dictionary.

        This method call passes on the call to the C library, and does
        some internal bookkeeping.
        """
        self._check_this()
        tag = EnchantStr(tag)
        new_dict = _e.broker_request_dict(self._this, tag.encode())
        if new_dict is None:
            eStr = "Dictionary for language '%s' could not be found"
            self._raise_error(eStr % (tag, ), DictNotFoundError)
        return new_dict
Example #3
0
    def _request_dict_data(self, tag):
        """Request raw C pointer data for a dictionary.

        This method call passes on the call to the C library, and does
        some internal bookkeeping.
        """
        self._check_this()
        new_dict = _e.broker_request_dict(self._this, tag.encode())
        if new_dict is None:
            e_str = "Dictionary for language '%s' could not be found\n"
            e_str += "Please check https://pyenchant.github.io/pyenchant/ for details"
            self._raise_error(e_str % (tag, ), DictNotFoundError)
        if new_dict not in self._live_dicts:
            self._live_dicts[new_dict] = 1
        else:
            self._live_dicts[new_dict] += 1
        return new_dict