Hi everyone,

I just (re)added support for setting (see
http://sourceforge.net/mailarchive/message.php?msg_id=26953764) and getting
safearrays as NumPy arrays. By default, for backwards compatibility,
safearrays are retrieved as tuples. With python >= 2.5, you can now do the
following:

>>> from comtypes.safearray import safearray_as_ndarray
>>> with safearray_as_ndarray:
>>>     my_arr = some_com_object.MethodThatReturnsSafeArray()

This is a much faster way to access large arrays. If you didn't have speed
issues before, you probably won't need this.

Enjoy,

Chris Farrow
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to