out parameters in Python and COM

Mark Hammond mhammond at skippinet.com.au
Mon Oct 21 18:54:07 EDT 2002


Henk wrote:
> When debugging my exe using Python I always get empty values for a,b
> and c (see below) allthough they are filled in correctly inside the
> exe (checked with a debugger).
> 
> Any idea what could be wrong?

In Python, these values are still *returned*.

> import win32com.client
> 
> atm = win32com.client.Dispatch("ATM.Shell")
> b4 = atm.LogOn("Administrator", "EHSW", "Python")
> 
> 
> a=""
> b=""
> c=""
> HEMgr = atm.ATMHeadEndManager
> HEMgr.SetCodeTable("BS","ES","EE")
> HEMgr.GetCodeTable(a,b,c)

You code should say:

a,b,c,d = HEMgr.GetCodeTable()

Mark.




More information about the Python-list mailing list