method, the PythonCOM framework automatically selects the best
available binding method; if MakePy support for an object exists, it
provides early binding; otherwise the dynamic dispatch method provides late
binding. In some cases, you may wish to get explicit control over the
win32com.client.Dispatch() method achieves
this functionality by initially checking to see if MakePy support
exists for the object. If MakePy support doesn’t exist, the
win32com.client.dynamic is called to
perform the late-bound functionality. To force late binding for your
objects, use the
directly, bypassing any MakePy-generated objects.
module contains only one function
designed to be used by Python programmers,
. This function is used in the same way
win32com.client.Dispatch(), except that MakePy
support is never used for the returned object.
To force the use of early binding to access COM objects, you must
force the MakePy process in your code. Once you have ensured the
MakePy support exists, use
win32com.client.Dispatch() as usual. It always
returns the MakePy-supported wrappers for your COM object.
To force the MakePy process, the
module is used. This module contains the
code that manages the directory of MakePy-generated source files: the
generated cache, or gencache. There ...