I am trying to define a new class in python and inherit the properties of an existing COM object.
Here is my code so far:
import win32com.client
excel=win32com.client.Dispatch('Excel.Application')
excelapp.Visible=1 #opens excel window
class XL(excelapp):
def __init__(self):
excelapp.__init__(self)
XL.Visible=1 #does not work
Basically all I want to do is inherit the COM object into my own class so I can add some functions/operations that I can just call as XL.function_name() and also be able to use all the functions available using excelapp.function_name().
I realize I may be asking this in a confusing way because I do not know alot about this and know even less about COM objects, but appreciate any feedback or help anyone could provide!
Thanks!!