|
You might need to patch a file in
pywin32.
C:\Python26\Lib\site-packages\win32com\client\__init__.py The first function should be commented out, only the protoype and return should remain: def __WrapDispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, \ UnicodeToString=None, clsctx = pythoncom.CLSCTX_SERVER, WrapperClass = None): """ Helper function to return a makepy generated class for a CLSID if it exists, otherwise cope by using CDispatch. """ #assert UnicodeToString is None, "this is deprecated and will go away" #if resultCLSID is None: #try: #typeinfo = dispatch.GetTypeInfo() #if typeinfo is not None: # Some objects return NULL, some raise exceptions... #resultCLSID = str(typeinfo.GetTypeAttr()[0]) #except (pythoncom.com_error, AttributeError): #pass #if resultCLSID is not None: #import gencache ## Attempt to load generated module support ## This may load the module, and make it available #klass = gencache.GetClassForCLSID(resultCLSID) #if klass is not None: #return klass(dispatch) # Return a "dynamic" object - best we can do! if WrapperClass is None: WrapperClass = CDispatch return dynamic.Dispatch(dispatch, userName, WrapperClass, typeinfo, clsctx=clsctx) Maybe this might work. ![]()
|
- Re: Python Heads Please spread the love Alok
- Re: Python Heads Please spread the love Raffaele Fragapane
- Re: Python Heads Please spread the love Xavier Lapointe
- Re: Python Heads Please spread the love Xavier Lapointe
- Re: Python Heads Please spread the love Ben Beckett


