There are a number of differences between using early and late binding within Python. All these changes are specific to Python and not to COM itself. These differences are most significant when moving from code that uses late binding to code that uses early binding.
The key difference is the handling of parameters; in fact, these differences are so significant that we discuss them separately later in the section Passing and Obtaining Python Objects from COM.
Another fundamental difference is case sensitivity. Late
binding is generally not sensitive to the case of methods and
properties, while early binding is. To see an example of this, create
a late-bound Excel object and adjust its
property. As discussed in the previous
section, you force a late-bound object even if MakePy support exists
for the object:
>>> import win32com.client.dynamic >>> xl=win32com.client.dynamic.Dispatch("Excel.Application") >>> xl.Visible=1 >>> print xl.VISIBLE 1 >>>
You can use both
in this context.
Now let’s try the same example using early bindings. Assume that you have generated MakePy support for Microsoft Excel and use the same code:
>>> import win32com.client >>> xl=win32com.client.Dispatch("Excel.Application") >>> xl.Visible=1 >>> print xl.VISIBLE Traceback (innermost last): File "<stdin>", line 1, in ? File "c:\Program Files\Python\win32com\gen_py\00020813-0000-0000-C000- 000000000046x0x1x2.py", line 1462, in __getattr__ raise ...