[pywin32-checkins] pywin32/com/win32com/client combrowse.py, 1.6, 1.7
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2007-07-12 07:53:03
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17344/com/win32com/client Modified Files: combrowse.py Log Message: Get the COM browser working again by encoding Unicode as MBCS Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** combrowse.py 22 Apr 2004 00:26:44 -0000 1.6 --- combrowse.py 12 Jul 2007 07:53:04 -0000 1.7 *************** *** 50,54 **** if name is None: try: ! name = pythoncom.ProgIDFromCLSID(myobject) except pythoncom.com_error: name = str(myobject) --- 50,54 ---- if name is None: try: ! name = pythoncom.ProgIDFromCLSID(myobject).encode('mbcs') except pythoncom.com_error: name = str(myobject) *************** *** 263,267 **** typeinfo = typelib.GetTypeInfo(index) self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLITypeLibEntry.__init__(self, myitem, name) def GetText(self): --- 263,267 ---- typeinfo = typelib.GetTypeInfo(index) self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLITypeLibEntry.__init__(self, myitem, name) def GetText(self): *************** *** 274,278 **** for j in range(attr[7]): vdesc = typeinfo.GetVarDesc(j) ! name = typeinfo.GetNames(vdesc[0])[0] ret.append(browser.MakeHLI(vdesc[1], name)) return ret --- 274,278 ---- for j in range(attr[7]): vdesc = typeinfo.GetVarDesc(j) ! name = typeinfo.GetNames(vdesc[0])[0].encode('mbcs') ret.append(browser.MakeHLI(vdesc[1], name)) return ret *************** *** 282,286 **** typeinfo, index = myitem self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLICOM.__init__(self, myitem, name) def GetText(self): --- 282,286 ---- typeinfo, index = myitem self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLICOM.__init__(self, myitem, name) def GetText(self): *************** *** 372,376 **** typeinfo, index = myitem self.id = typeinfo.GetFuncDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLICOM.__init__(self, myitem, name) def GetText(self): --- 372,376 ---- typeinfo, index = myitem self.id = typeinfo.GetFuncDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLICOM.__init__(self, myitem, name) def GetText(self): *************** *** 402,406 **** ret.append(browser.MakeHLI(self.id, "Dispatch ID")) if len(names)>1: ! ret.append(browser.MakeHLI(string.join(names[1:], ", "), "Named Params")) fd = typeinfo.GetFuncDesc(index) if fd[1]: --- 402,406 ---- ret.append(browser.MakeHLI(self.id, "Dispatch ID")) if len(names)>1: ! ret.append(browser.MakeHLI(", ".join(names[1:]).encode('mbcs'), "Named Params")) fd = typeinfo.GetFuncDesc(index) if fd[1]: |