win32com: How to use optional parameters?
Ilja Heitlager
news at heitlager.com
Wed Jul 12 06:07:08 EDT 2000
>why not hold the places like this:
>
>xl.Worksheets.Add(NULL,NULL,NULL,aftervaluehere)
NULL is not a keyword in Python, but if I used pythoncom.Empty instead It
worked thanx
Marc Hammond suggested I changed the top few constants from
"pythoncom.Missing" to "pythoncom.Empty" in the
.py generated by makepy. Which works if beter, bexuase I can use the named
parameters
>just as if you weren't using the "parametername=varnam" syntax, even VB
>would default to the order the function expects the calls.
Now both work.
>
>Another sure way to find out would be to generate the MIDL for the excel
VBA
>you are coding, then you could do the same thing in C/C++ COM which would
>most certainly require the correct order of parameters and not named
>parameters in any order.
Don't understand this, but sound complicated. Since Python, C/C++ is not an
option for me anymore ;-)
More information about the Python-list
mailing list