[python-win32] Advice about usinf win32com

Tim Roberts timr at probo.com
Tue Mar 20 12:33:28 EDT 2018


Marchand, Pascal wrote:
>  
>
> I'm trying to discuss with a Zebra RFID/bar code scanner using the WMI
> provider as recommended in dev guides, it runs fairly well with
> properties, I got method names and parameters too, but I didn't reach
> to make run method with byref parameter e.g. method(inpar, outpar)
> both parameters are strings (xml message), the function returns a
> status code correctly, see code below.
>

Python cannot do "out" parameters at all.  In the win32com world, when a
call has one "in" and one "out" parameter, instead of this:
    status = function( in, out )
it gets written like this:
    (status, out) = function( in )

There are some cases when the win32com machinery can't detect that, but
usually it works.  Give that a shot.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list