Kelie schrieb: > Thank you Thomas! > > I was close. I tried entity[1] because I thought it is the 2nd item and got a > message: > No handlers could be found for logger "comtypes._comobject" >
Well, the point is: you are not accessing items, you are dereferencing a pointer (or a pointer-like object). In C, to dereference a pointer you would write: int *ptr; int value; ... value = *ptr; *ptr = value; You could write as well this which has exactly the same sematics: int *ptr; int value; ... value = ptr[0]; ptr[0] = value; In Python (ctypes and comtypes), there is no '*' operator so to dereference a pointer instance you must use 'ptr[0]' instead of '*ptr'. This should probably be made clearer in the ctypes docs. > No handlers could be found for logger "comtypes._comobject" You get this sometimes when comtypes catches an exception internally somewhere. comtypes uses the logging module to log more or less interesting stuff, including exceptions that it catches somewhere. To see the output, include this stuff at the top of your script, and you will see the tracebacks: import logging; logging.basicConfig(level=logging.error) Use 'logging.warning', logging.info, logging.debug instead of 'logging.error' for more output. -- Thanks, Thomas ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users