What is the right way to wrap non-python objects so methods have text comprehension?

87 Views Asked by At

I have an application (Solidworks in my case, link is to the com_obj documentation for reference) that has an api. I can access and use the the object by:

import pythoncom
import win32com.client
from win32com.client import VARIANT

com_obj = win32com.client.Dispatch("SLDWORKS.Application")

arg = win32com.client.VARIANT(pythoncom.VT_I4, 1)
com_obj.SomeMethod(arg)

The problem is, how to know what methods are in com_obj as there is no code completion when you type com_obj. . Obviously the documentation for the api is the answer, but is there a way to do this?

0

There are 0 best solutions below