How to pass "byref" parameters to COM object methods

Bob Kline bkline at
Sat Aug 4 18:39:44 CEST 2001

I don't see any way, reading through the documentation for using COM as
a client from the ActiveState distribution of Python, to pass an
argument to a method of a COM object in such a way that the method can
set the value of the argument.  I expected to see something like the
ability to create an object of a Variant class, which I would think
would be the cleanest approach (as opposed to something like passing a
list with one member), but can't find anything along these lines.

An example of where such a mechanism is needed is the Execute() method
of the ADO Connection object.  Microsoft uses the RecordsAffected
parameter to return the count of rows affected by the operation

I assume I'm just not looking in the right place.  Could someone kindly
point me to the appropriate section of the ActiveState documentation?
Thanks very much.

Bob Kline
mailto:bkline at

More information about the Python-list mailing list