Update of /cvsroot/pywin32/pywin32/com/win32com/demos
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25938/com/win32com/demos
Modified Files:
Tag: py3k
excelRTDServer.py ietoolbar.py trybag.py
Log Message:
merge lots of fixes from the trunk
Index: ietoolbar.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/ietoolbar.py,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -C2 -d -r1.1.4.3 -r1.1.4.4
*** ietoolbar.py 27 Nov 2008 05:36:19 -0000 1.1.4.3
--- ietoolbar.py 27 Nov 2008 11:31:04 -0000 1.1.4.4
***************
*** 75,79 ****
def __setattr__(self, attr, val):
! if not attr.startswith("_") and not self.__dict__.has_key(attr):
raise AttributeError(attr)
self.__dict__[attr] = val
--- 75,79 ----
def __setattr__(self, attr, val):
! if not attr.startswith("_") and attr not in self.__dict__:
raise AttributeError(attr)
self.__dict__[attr] = val
Index: trybag.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/trybag.py,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** trybag.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
--- trybag.py 27 Nov 2008 11:31:04 -0000 1.1.4.2
***************
*** 14,18 ****
def Read(self, propName, varType, errorLog):
print("read: name=", propName, "type=", varType)
! if not self.data.has_key(propName):
if errorLog:
hr = 0x80070057
--- 14,18 ----
def Read(self, propName, varType, errorLog):
print("read: name=", propName, "type=", varType)
! if propName not in self.data:
if errorLog:
hr = 0x80070057
Index: excelRTDServer.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/excelRTDServer.py,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** excelRTDServer.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
--- excelRTDServer.py 27 Nov 2008 11:31:04 -0000 1.1.4.2
***************
*** 156,160 ****
self.OnDisconnectData(TopicID)
! if self.topics.has_key(TopicID):
self.topics[TopicID] = None
del self.topics[TopicID]
--- 156,160 ----
self.OnDisconnectData(TopicID)
! if TopicID in self.topics:
self.topics[TopicID] = None
del self.topics[TopicID]
***************
*** 187,191 ****
# ( (topic_num1, topic_num2, ..., topic_numN), \
# (topic_val1, topic_val2, ..., topic_valN) )
! for idx, topicdata in enumerate(self.topics.iteritems()):
topicNum, topic = topicdata
results[0][idx] = topicNum
--- 187,191 ----
# ( (topic_num1, topic_num2, ..., topic_numN), \
# (topic_val1, topic_val2, ..., topic_valN) )
! for idx, topicdata in enumerate(iter(self.topics.items())):
topicNum, topic = topicdata
results[0][idx] = topicNum
***************
*** 335,339 ****
if len(self.topics):
refresh = False
! for topic in self.topics.itervalues():
topic.Update(self)
if topic.HasChanged():
--- 335,339 ----
if len(self.topics):
refresh = False
! for topic in self.topics.values():
topic.Update(self)
if topic.HasChanged():
|