How Do I Perform Introspection on an Object in Python 2.x?

前端 未结 5 1424
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 23:42

I\'m using Python 2.x and I have an object I\'m summoning from the aether; the documentation on it is not particularly clear. I would like to be able to get a list of prope

5条回答
  •  春和景丽
    2020-12-06 00:06

    If you're using win32com.client.Dispatch, inspecting the Python object might not be much help as it's a generic wrapper for IDispatch.

    You can use makepy (which comes with Activestate Python) to generate a Python wrapper from the type library. Then you can look at the code for the wrapper.

提交回复
热议问题