[pywin32-checkins] pywin32/Pythonwin/pywin/tools browser.py, 1.10.2.7, 1.10.2.8
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2009-01-25 04:52:31
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24579/Pythonwin/pywin/tools Modified Files: Tag: py3k browser.py Log Message: merge recent changes from the trunk Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.10.2.7 retrieving revision 1.10.2.8 diff -C2 -d -r1.10.2.7 -r1.10.2.8 *** browser.py 14 Jan 2009 12:42:02 -0000 1.10.2.7 --- browser.py 25 Jan 2009 04:52:20 -0000 1.10.2.8 *************** *** 6,9 **** --- 6,11 ---- # or # >>> browser.Browse(your_module) + import sys + import types import __main__ import win32ui *************** *** 11,15 **** from . import hierlist - from types import * special_names = [ '__doc__', '__name__', '__self__' ] --- 13,16 ---- *************** *** 265,286 **** TypeMap = { type : HLIClass, ! FunctionType: HLIFunction, tuple: HLITuple, dict: HLIDict, list: HLIList, ! ModuleType: HLIModule, ! CodeType : HLICode, ! BuiltinFunctionType : HLIBuiltinFunction, ! FrameType : HLIFrame, ! TracebackType : HLITraceback, str : HLIString, int: HLIPythonObject, ! ## LongType: HLIPythonObject, - hrm - fixme for py2k float: HLIPythonObject, } - try: - TypeMap[UnicodeType] = HLIString - except NameError: - pass # Python 1.5 - no Unicode - no problem! def MakeHLI( ob, name=None ): --- 266,285 ---- TypeMap = { type : HLIClass, ! types.FunctionType: HLIFunction, tuple: HLITuple, dict: HLIDict, list: HLIList, ! types.ModuleType: HLIModule, ! types.CodeType : HLICode, ! types.BuiltinFunctionType : HLIBuiltinFunction, ! types.FrameType : HLIFrame, ! types.TracebackType : HLITraceback, ! str : HLIString, str : HLIString, int: HLIPythonObject, ! int: HLIPythonObject, ! bool: HLIPythonObject, float: HLIPythonObject, } def MakeHLI( ob, name=None ): *************** *** 288,291 **** --- 287,293 ---- cls = TypeMap[type(ob)] except KeyError: + # hrmph - this check gets more and more bogus as Python + # improves. Its possible we should just *always* use + # HLIInstance? if hasattr(ob, '__class__'): # 'new style' class cls = HLIInstance |