Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4261/Pythonwin/pywin/tools
Modified Files:
Tag: py3k
browseProjects.py browser.py hierlist.py
Log Message:
merge lots of changes (most via 2to3) from the trunk
Index: hierlist.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/hierlist.py,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -C2 -d -r1.7.2.3 -r1.7.2.4
*** hierlist.py 27 Nov 2008 11:31:03 -0000 1.7.2.3
--- hierlist.py 5 Jan 2009 12:51:26 -0000 1.7.2.4
***************
*** 313,314 ****
--- 313,331 ----
def GetSelectedBitmapColumn(self):
return None # same as other
+ # for py3k/rich-comp sorting compatibility.
+ def __cmp__(self):
+ # this is always overridden, but to be sure...
+ return cmp(id(self), id(other))
+ def __lt__(self, other):
+ try:
+ return self.__cmp__(self, other) < 0
+ except TypeError:
+ # we want unrelated items to be sortable...
+ return id(self) < id(other)
+ # for py3k/rich-comp equality compatibility.
+ def __eq__(self, other):
+ try:
+ return __cmp__(self, other) == 0
+ except TypeError:
+ # unrelated items compare false
+ return 0
Index: browser.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v
retrieving revision 1.10.2.5
retrieving revision 1.10.2.6
diff -C2 -d -r1.10.2.5 -r1.10.2.6
*** browser.py 4 Dec 2008 07:28:46 -0000 1.10.2.5
--- browser.py 5 Jan 2009 12:51:26 -0000 1.10.2.6
***************
*** 13,17 ****
from types import *
-
special_names = [ '__doc__', '__name__', '__self__' ]
--- 13,16 ----
***************
*** 24,32 ****
self.knownExpandable = None
if name:
- assert type(name)==str, repr(name) # encode to mbcs if necessary
self.name=name
else:
try:
! self.name=str(myobject.__name__)
except (AttributeError, TypeError):
try:
--- 23,30 ----
self.knownExpandable = None
if name:
self.name=name
else:
try:
! self.name=myobject.__name__
except (AttributeError, TypeError):
try:
***************
*** 59,63 ****
except (AttributeError, TypeError):
pass
! if ob:
lst.insert(0, HLIDocString( ob, "Doc" ))
--- 57,65 ----
except (AttributeError, TypeError):
pass
! # I don't quite grok descriptors enough to know how to
! # best hook them up. Eg:
! # >>> object.__getattribute__.__class__.__doc__
! # <attribute '__doc__' of 'wrapper_descriptor' objects>
! if ob and isinstance(ob, str):
lst.insert(0, HLIDocString( ob, "Doc" ))
***************
*** 261,265 ****
list: HLIList,
ModuleType: HLIModule,
- ## InstanceType : HLIInstance,
CodeType : HLICode,
BuiltinFunctionType : HLIBuiltinFunction,
--- 263,266 ----
***************
*** 268,272 ****
str : HLIString,
int: HLIPythonObject,
! ## LongType: HLIPythonObject,
float: HLIPythonObject,
}
--- 269,273 ----
str : HLIString,
int: HLIPythonObject,
! ## LongType: HLIPythonObject, - hrm - fixme for py2k
float: HLIPythonObject,
}
Index: browseProjects.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browseProjects.py,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -C2 -d -r1.3.2.2 -r1.3.2.3
*** browseProjects.py 27 Nov 2008 11:31:03 -0000 1.3.2.2
--- browseProjects.py 5 Jan 2009 12:51:26 -0000 1.3.2.3
***************
*** 1,3 ****
! import hierlist, string, regutil, os
import win32con, win32ui, win32api
import commctrl
--- 1,4 ----
! import regutil, os
! from . import hierlist
import win32con, win32ui, win32api
import commctrl
|