Ejemplo n.º 1
0
 def request_pwl_dict(self,pwl):
     """Request a Dict object for a personal word list.
     
     This method behaves as 'request_dict' but rather than returning
     a dictionary for a specific language, it returns a dictionary
     referencing a personal word list.  A personal word list is a file
     of custom dictionary entries, one word per line.
     """
     self._check_this()
     pwl = EnchantStr(pwl)
     new_dict = _e.broker_request_pwl_dict(self._this,pwl.encode())
     if new_dict is None:
         eStr = "Personal Word List file '%s' could not be loaded"
         self._raise_error(eStr % (pwl,))
     d = Dict(False)
     d._switch_this(new_dict,self)
     return d
Ejemplo n.º 2
0
 def request_pwl_dict(self, pwl):
     """Request a Dict object for a personal word list.
     
     This method behaves as 'request_dict' but rather than returning
     a dictionary for a specific language, it returns a dictionary
     referencing a personal word list.  A personal word list is a file
     of custom dictionary entries, one word per line.
     """
     self._check_this()
     pwl = EnchantStr(pwl)
     new_dict = _e.broker_request_pwl_dict(self._this, pwl.encode())
     if new_dict is None:
         eStr = "Personal Word List file '%s' could not be loaded"
         self._raise_error(eStr % (pwl, ))
     d = Dict(False)
     d._switch_this(new_dict, self)
     return d