accessing an OLE Automation (IDispatch) server from python which requires the use of "out params"
Mark Hammond
skippy.hammond at gmail.com
Mon Dec 10 20:16:43 EST 2012
On 11/12/2012 8:39 AM, bitbucket wrote:
> On Monday, December 10, 2012 3:58:33 PM UTC-5, Terry Reedy wrote:
>> I believe the easiest way to do that is to install the pywin
>> extensions
>>
>> http://sourceforge.net/projects/pywin32/?source=directory
>>
>> I assume it can handle out params.
>
> That definitely looks like a good starting point. Just hoping
> someone knows whether or not it'll support the out params before I
> spend too much time digging into it.
"out" params are best supported if the object supplied a typelib - then
Python knows the params are out and does the right thing automagically.
If out params are detected, the result of the function will be a tuple
of (real_result, out_param1, ...)
Even if no typelib is supported, you can access them with a little pain
via the win32com.client.Dispatch() object. You might like to follow up
to the python-win32 at python.org mailing list where many people will be
able to help.
HTH,
Mark
More information about the Python-list
mailing list