def closeDictionary(self): """Closes this Dictionary. This will shut down all threads dealing with this Dictionary and you won't recieve any more events. Exceptions: RuntimeError - If current platform is not supported/phidget c dll cannot be found PhidgetException: If this Dictionary is not opened. """ try: result = PhidgetLibrary.getDll().CPhidgetDictionary_close( self.handle) except RuntimeError: raise if result > 0: description = Phidget.getErrorDescription(result) raise PhidgetException(result, description) else: try: result = PhidgetLibrary.getDll().CPhidgetDictionary_delete( self.handle) except RuntimeError: raise if result > 0: raise PhidgetException(result)
def closeDictionary(self): """Closes this Dictionary. This will shut down all threads dealing with this Dictionary and you won't recieve any more events. Exceptions: RuntimeError - If current platform is not supported/phidget c dll cannot be found PhidgetException: If this Dictionary is not opened. """ try: result = PhidgetLibrary.getDll().CPhidgetDictionary_close(self.handle) except RuntimeError: raise if result > 0: description = Phidget.getErrorDescription(result) raise PhidgetException(result, description) else: try: result = PhidgetLibrary.getDll().CPhidgetDictionary_delete(self.handle) except RuntimeError: raise if result > 0: raise PhidgetException(result)