def _fillSuggestionList(self, suggestions):
     model = self.suggestion_list_view.get_model()
     model.clear()
     for suggestion in suggestions:
         value = unicode("%s" % (suggestion, ))
         model.append([
             value,
         ])
Esempio n. 2
0
 def test_UnicodeFN(self):
     """Test that unicode PWL filenames are accepted."""
     d = request_pwl_dict(unicode(self._path()))
     self.assertTrue(d)
Esempio n. 3
0
 def test_UnicodeFN(self):
     """Test that unicode PWL filenames are accepted."""
     d = request_pwl_dict(unicode(self._path()))
     self.assertTrue(d)
Esempio n. 4
0
# On win32 we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if sys.platform == "win32":
    e_path = None
    try:
        e_path = utils.get_resource_filename("libenchant.dll")
    except (Error,ImportError):
         try:
            e_path = utils.get_resource_filename("libenchant-1.dll")
         except (Error,ImportError):
            pass
    if e_path is not None:
        # We need to use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH so
        # that we don't accidentally suck in other versions of e.g. glib.
        if not isinstance(e_path,unicode):
            e_path = unicode(e_path,sys.getfilesystemencoding())
        LoadLibraryEx = windll.kernel32.LoadLibraryExW
        LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008
        e_handle = LoadLibraryEx(e_path,None,LOAD_WITH_ALTERED_SEARCH_PATH)
        if not e_handle:
            raise WinError()
        e = CDLL(e_path,handle=e_handle)


# On darwin we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if e is None and sys.platform == "darwin":
  try:
      e_path = utils.get_resource_filename("lib/libenchant.1.dylib")
  except (Error,ImportError):
      pass
Esempio n. 5
0
# On win32 we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if sys.platform == "win32":
    e_path = None
    try:
        e_path = utils.get_resource_filename("libenchant.dll")
    except (Error,ImportError):
         try:
            e_path = utils.get_resource_filename("libenchant-1.dll")
         except (Error,ImportError):
            pass
    if e_path is not None:
        # We need to use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH so
        # that we don't accidentally suck in other versions of e.g. glib.
        if not isinstance(e_path,unicode):
            e_path = unicode(e_path,sys.getfilesystemencoding())
        LoadLibraryEx = windll.kernel32.LoadLibraryExW
        LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008
        e_handle = LoadLibraryEx(e_path,None,LOAD_WITH_ALTERED_SEARCH_PATH)
        if not e_handle:
            raise WinError()
        e = CDLL(e_path,handle=e_handle)


# On darwin we ship a bundled version of the enchant DLLs.
# Use them if they're present.
if e is None and sys.platform == "darwin":
  try:
      e_path = utils.get_resource_filename("lib/libenchant.1.dylib")
  except (Error,ImportError):
      pass
Esempio n. 6
0
 def _fillSuggestionList(self,suggestions):
     model = self.suggestion_list_view.get_model()
     model.clear()
     for suggestion in suggestions:
         value = unicode("%s"%(suggestion,))
         model.append([value,])