Example #1
0
 def __tryOpenWithOldApi(self, variant):
     lib = getVoikkoCLibrary()
     handle = c_int(-1)
     error = lib.voikko_init_with_path(byref(handle), variant, 0,
                                       self.dataDir.getDirectory())
     isOk = not bool(error)
     lib.voikko_terminate(handle)
     return isOk
	def __tryOpenWithOldApi(self, variant):
		lib = getVoikkoCLibrary()
		handle = c_int(-1)
		error = lib.voikko_init_with_path(byref(handle), variant,
		        0, self.dataDir.getDirectory())
		isOk = not bool(error)
		lib.voikko_terminate(handle)
		return isOk
Example #3
0
 def __tryOpenWithNewApi(self, variant):
     lib = getVoikkoCLibrary()
     error = c_char_p()
     handle = lib.voikkoInit(byref(error), variant,
                             self.dataDir.getDirectory())
     if error.value == None:
         lib.voikkoTerminate(handle)
         return True
     else:
         return False
	def __tryOpenWithNewApi(self, variant):
		lib = getVoikkoCLibrary()
		error = c_char_p()
		handle = lib.voikkoInit(byref(error), variant,
		         self.dataDir.getDirectory())
		if error.value == None:
			lib.voikkoTerminate(handle)
			return True
		else:
			return False