Python使用com接口时的错误

TypeError: This COM object can not automate the makepy process - please run makepy manually for this object
这是因为python读取不到COM的相关接口信息,所有需要我们手动去执行makepy来生成它们。

There is, however, a technique automation objects use to publish their object model in a type library. Type libraries define a set of interfaces a program can use to determine both the methods and properties themselves, and other useful information, such as the type of the parameters or return values. Languages or environments may be capable of using this information at compile-time to provide a better interface to the objects.
The typelib – A TLB, DLL, OCX or anything containing COM type information.
If a typelib is not specified, a window containing a textbox will open from which you can select a registered type library.

To generate a MakePy file at runtime, you need to know the unique ID of the type library (a CLSID) and its version and language identifier.
This information is usually not easy to find, so the MakePy module supports a convenient method to
obtain this information.

MakePy -i 

你可能感兴趣的:(Python)