pywin32-checkins Mailing List for Python for Windows Extensions (Page 50)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2008-11-27 04:58:49
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32comext/axdebug Modified Files: Tag: py3k codecontainer.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: codecontainer.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/codecontainer.py,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** codecontainer.py 26 Nov 2008 09:03:29 -0000 1.4.4.1 --- codecontainer.py 27 Nov 2008 04:58:41 -0000 1.4.4.2 *************** *** 206,210 **** self.text = open(fname, "r").read() except IOError as details: ! self.text = "# Exception opening file\n# %s" % (`details`) else: self.text = "# No file available for module '%s'" % (self.module) --- 206,210 ---- self.text = open(fname, "r").read() except IOError as details: ! self.text = "# Exception opening file\n# %s" % (repr(details)) else: self.text = "# No file available for module '%s'" % (self.module) |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/win32/Lib Modified Files: Tag: py3k win32evtlogutil.py win32serviceutil.py win32timezone.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.26.2.2 retrieving revision 1.26.2.3 diff -C2 -d -r1.26.2.2 -r1.26.2.3 *** win32serviceutil.py 26 Nov 2008 09:03:30 -0000 1.26.2.2 --- win32serviceutil.py 27 Nov 2008 04:58:42 -0000 1.26.2.3 *************** *** 613,617 **** DebugService(cls, args) ! if not knownArg and len(args)<>1: usage() # the rest of the cmds don't take addn args --- 613,617 ---- DebugService(cls, args) ! if not knownArg and len(args)!=1: usage() # the rest of the cmds don't take addn args Index: win32evtlogutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32evtlogutil.py,v retrieving revision 1.10.4.1 retrieving revision 1.10.4.2 diff -C2 -d -r1.10.4.1 -r1.10.4.2 *** win32evtlogutil.py 26 Nov 2008 09:03:30 -0000 1.10.4.1 --- win32evtlogutil.py 27 Nov 2008 04:58:41 -0000 1.10.4.2 *************** *** 123,127 **** finally: win32api.RegCloseKey(handle) ! return data or u'' # Don't want "None" ever being returned. def SafeFormatMessage( eventLogRecord, logType=None ): --- 123,127 ---- finally: win32api.RegCloseKey(handle) ! return data or '' # Don't want "None" ever being returned. def SafeFormatMessage( eventLogRecord, logType=None ): *************** *** 136,141 **** desc = "" else: ! desc = u", ".join(eventLogRecord.StringInserts) ! return u"<The description for Event ID ( %d ) in Source ( %r ) could not be found. It contains the following insertion string(s):%r.>" % (winerror.HRESULT_CODE(eventLogRecord.EventID), eventLogRecord.SourceName, desc) def FeedEventLogRecords(feeder, machineName = None, logName = "Application", readFlags = None): --- 136,141 ---- desc = "" else: ! desc = ", ".join(eventLogRecord.StringInserts) ! return "<The description for Event ID ( %d ) in Source ( %r ) could not be found. It contains the following insertion string(s):%r.>" % (winerror.HRESULT_CODE(eventLogRecord.EventID), eventLogRecord.SourceName, desc) def FeedEventLogRecords(feeder, machineName = None, logName = "Application", readFlags = None): Index: win32timezone.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32timezone.py,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -C2 -d -r1.9.2.3 -r1.9.2.4 *** win32timezone.py 26 Nov 2008 09:03:30 -0000 1.9.2.3 --- win32timezone.py 27 Nov 2008 04:58:42 -0000 1.9.2.4 *************** *** 414,418 **** values = _RegValueEnumerator(key) values = tuple(values) ! return dict(map(lambda (name,value,type): (name,value), values)) # for backward compatibility --- 414,418 ---- values = _RegValueEnumerator(key) values = tuple(values) ! return dict(map(lambda name_value_type: (name_value_type[0],name_value_type[1]), values)) # for backward compatibility |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32comext/mapi Modified Files: Tag: py3k mapiutil.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** mapiutil.py 26 Nov 2008 09:03:30 -0000 1.5.4.2 --- mapiutil.py 27 Nov 2008 04:58:41 -0000 1.5.4.3 *************** *** 83,87 **** return None if bRetList: ! return map( lambda(v): v[1], data ) else: return data[0][1] --- 83,87 ---- return None if bRetList: ! return map( lambda v: v[1], data ) else: return data[0][1] *************** *** 94,98 **** if make_tag_names: hr, tags, array = obj.GetNamesFromIDs( (tag,) ) ! if type(array[0][1])==type(u''): name = array[0][1] else: --- 94,98 ---- if make_tag_names: hr, tags, array = obj.GetNamesFromIDs( (tag,) ) ! if type(array[0][1])==type(''): name = array[0][1] else: *************** *** 106,111 **** type(0.0): mapitags.PT_DOUBLE, type(0): mapitags.PT_I4, ! type(''): mapitags.PT_STRING8, ! type(u''): mapitags.PT_UNICODE, type(None): mapitags.PT_UNSPECIFIED, # In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)). --- 106,111 ---- type(0.0): mapitags.PT_DOUBLE, type(0): mapitags.PT_I4, ! type(''.encode('ascii')): mapitags.PT_STRING8, # str in py2x, bytes in 3x ! type(''): mapitags.PT_UNICODE, # XXX - fix better for py3k type(None): mapitags.PT_UNSPECIFIED, # In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)). *************** *** 159,163 **** tagType = mapitags.PT_SYSTIME else: ! raise ValueError("The type of object %s(%s) can not be written" % (`val`,type_val)) key = mapitags.PROP_TAG(tagType, mapitags.PROP_ID(newIds[newIdNo])) newIdNo = newIdNo + 1 --- 159,163 ---- tagType = mapitags.PT_SYSTIME else: ! raise ValueError("The type of object %s(%s) can not be written" % (repr(val),type_val)) key = mapitags.PROP_TAG(tagType, mapitags.PROP_ID(newIds[newIdNo])) newIdNo = newIdNo + 1 |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32com/test Modified Files: Tag: py3k GenTestScripts.py policySemantics.py testClipboard.py testCollections.py testDictionary.py testDynamic.py testGIT.py testGatewayAddresses.py testMSOffice.py testPyComTest.py testShell.py util.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: GenTestScripts.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/GenTestScripts.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** GenTestScripts.py 26 Nov 2008 09:03:29 -0000 1.3.4.1 --- GenTestScripts.py 27 Nov 2008 04:58:41 -0000 1.3.4.2 *************** *** 31,35 **** print("compiling -", end=' ') fullModName = "win32com.test.%s.%s" % (genDir, fname) ! exec "import " + fullModName # Inject the generated module as a top level module. sys.modules[fname] = sys.modules[fullModName] --- 31,35 ---- print("compiling -", end=' ') fullModName = "win32com.test.%s.%s" % (genDir, fname) ! exec("import " + fullModName) # Inject the generated module as a top level module. sys.modules[fname] = sys.modules[fullModName] Index: testGatewayAddresses.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGatewayAddresses.py,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** testGatewayAddresses.py 26 Nov 2008 09:03:29 -0000 1.2.4.2 --- testGatewayAddresses.py 27 Nov 2008 04:58:41 -0000 1.2.4.3 *************** *** 58,62 **** global numErrors numErrors = numErrors + 1 ! print(when, "are not identical (%s, %s)" % (`ob1`, `ob2`)) --- 58,62 ---- global numErrors numErrors = numErrors + 1 ! print(when, "are not identical (%s, %s)" % (repr(ob1), repr(ob2))) Index: policySemantics.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/policySemantics.py,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** policySemantics.py 26 Nov 2008 09:03:29 -0000 1.4.4.2 --- policySemantics.py 27 Nov 2008 04:58:41 -0000 1.4.4.3 *************** *** 50,54 **** break dispids.sort() ! if dispids <> [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]: raise Error("Got back the wrong dispids: %s" % dispids) --- 50,54 ---- break dispids.sort() ! if dispids != [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]: raise Error("Got back the wrong dispids: %s" % dispids) *************** *** 60,64 **** # invoke _value_ if ob() != (1,2,3): ! raise Error("Bad result - got %s" % (`ob()`)) dispob = ob._oleobj_ --- 60,64 ---- # invoke _value_ if ob() != (1,2,3): ! raise Error("Bad result - got %s" % (repr(ob()))) dispob = ob._oleobj_ *************** *** 66,70 **** rc = dispob.Invoke(pythoncom.DISPID_EVALUATE, 0, pythoncom.DISPATCH_METHOD|pythoncom.DISPATCH_PROPERTYGET, 1) if rc != 6: ! raise Error("Evaluate returned").with_traceback(rc) --- 66,70 ---- rc = dispob.Invoke(pythoncom.DISPID_EVALUATE, 0, pythoncom.DISPATCH_METHOD|pythoncom.DISPATCH_PROPERTYGET, 1) if rc != 6: ! raise Error("Evaluate returned %d" % rc) Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.32.2.2 retrieving revision 1.32.2.3 diff -C2 -d -r1.32.2.2 -r1.32.2.3 *** testPyComTest.py 26 Nov 2008 09:03:29 -0000 1.32.2.2 --- testPyComTest.py 27 Nov 2008 04:58:41 -0000 1.32.2.3 *************** *** 24,28 **** print("The PyCOMTest module can not be located or generated.") print(importMsg) ! raise RuntimeError, importMsg # We had a bg where RegisterInterfaces would fail if gencache had --- 24,28 ---- print("The PyCOMTest module can not be located or generated.") print(importMsg) ! raise RuntimeError(importMsg) # We had a bg where RegisterInterfaces would fail if gencache had *************** *** 49,53 **** rc = apply(fn, args) if rc != result: ! raise error, "%s failed - result not %r but %r" % (pref, result, rc) def TestConstant(constName, pyConst): --- 49,53 ---- rc = apply(fn, args) if rc != result: ! raise error("%s failed - result not %r but %r" % (pref, result, rc)) def TestConstant(constName, pyConst): *************** *** 55,61 **** comConst = getattr(constants, constName) except: ! raise error, "Constant %s missing" % (constName,) if comConst != pyConst: ! raise error, "Constant value wrong for %s - got %s, wanted %s" % (constName, comConst, pyConst) # Simple handler class. This demo only fires one event. --- 55,61 ---- comConst = getattr(constants, constName) except: ! raise error("Constant %s missing" % (constName,)) if comConst != pyConst: ! raise error("Constant value wrong for %s - got %s, wanted %s" % (constName, comConst, pyConst)) # Simple handler class. This demo only fires one event. *************** *** 100,116 **** if rc[:-1] != ("def", 0, 1) or abs(rc[-1]-3.14)>.01: print(rc) ! raise error, "Did not get the optional values correctly" rc = o.TestOptionals("Hi", 2, 3, 1.1) if rc[:-1] != ("Hi", 2, 3) or abs(rc[-1]-1.1)>.01: print(rc) ! raise error, "Did not get the specified optional values correctly" rc = o.TestOptionals2(0) if rc != (0, "", 1): print(rc) ! raise error, "Did not get the optional2 values correctly" rc = o.TestOptionals2(1.1, "Hi", 2) if rc[1:] != ("Hi", 2) or abs(rc[0]-1.1)>.01: print(rc) ! raise error, "Did not get the specified optional2 values correctly" # if verbose: print "Testing structs" --- 100,116 ---- if rc[:-1] != ("def", 0, 1) or abs(rc[-1]-3.14)>.01: print(rc) ! raise error("Did not get the optional values correctly") rc = o.TestOptionals("Hi", 2, 3, 1.1) if rc[:-1] != ("Hi", 2, 3) or abs(rc[-1]-1.1)>.01: print(rc) ! raise error("Did not get the specified optional values correctly") rc = o.TestOptionals2(0) if rc != (0, "", 1): print(rc) ! raise error("Did not get the optional2 values correctly") rc = o.TestOptionals2(1.1, "Hi", 2) if rc[1:] != ("Hi", 2) or abs(rc[0]-1.1)>.01: print(rc) ! raise error("Did not get the specified optional2 values correctly") # if verbose: print "Testing structs" *************** *** 129,136 **** o.LongProp = 3 if o.LongProp != 3 or o.IntProp != 3: ! raise error, "Property value wrong - got %d/%d" % (o.LongProp,o.IntProp) o.LongProp = o.IntProp = -3 if o.LongProp != -3 or o.IntProp != -3: ! raise error, "Property value wrong - got %d/%d" % (o.LongProp,o.IntProp) # This number fits in an unsigned long. Attempting to set it to a normal # long will involve overflow, which is to be expected. But we do --- 129,136 ---- o.LongProp = 3 if o.LongProp != 3 or o.IntProp != 3: ! raise error("Property value wrong - got %d/%d" % (o.LongProp,o.IntProp)) o.LongProp = o.IntProp = -3 if o.LongProp != -3 or o.IntProp != -3: ! raise error("Property value wrong - got %d/%d" % (o.LongProp,o.IntProp)) # This number fits in an unsigned long. Attempting to set it to a normal # long will involve overflow, which is to be expected. But we do *************** *** 139,147 **** o.ULongProp = check if o.ULongProp != check: ! raise error, "Property value wrong - got %d (expected %d)" % (o.ULongProp, check) # currency. pythoncom.__future_currency__ = 1 if o.CurrencyProp != 0: ! raise error, "Expecting 0, got %r" % (o.CurrencyProp,) try: import decimal --- 139,147 ---- o.ULongProp = check if o.ULongProp != check: ! raise error("Property value wrong - got %d (expected %d)" % (o.ULongProp, check)) # currency. pythoncom.__future_currency__ = 1 if o.CurrencyProp != 0: ! raise error("Expecting 0, got %r" % (o.CurrencyProp,)) try: import decimal *************** *** 150,154 **** o.CurrencyProp = decimal.Decimal("1234.5678") if o.CurrencyProp != decimal.Decimal("1234.5678"): ! raise error, "got %r" % (o.CurrencyProp,) v1 = decimal.Decimal("1234.5678") # can't do "DoubleCurrencyByVal" in dynamic files. --- 150,154 ---- o.CurrencyProp = decimal.Decimal("1234.5678") if o.CurrencyProp != decimal.Decimal("1234.5678"): ! raise error("got %r" % (o.CurrencyProp,)) v1 = decimal.Decimal("1234.5678") # can't do "DoubleCurrencyByVal" in dynamic files. *************** *** 183,187 **** if type(i1) != types.InstanceType or type(i2) != types.InstanceType: # Yay - is now an instance returned! ! raise error, "GetMultipleInterfaces did not return instances - got '%s', '%s'" % (i1, i2) del i1 del i2 --- 183,187 ---- if type(i1) != types.InstanceType or type(i2) != types.InstanceType: # Yay - is now an instance returned! ! raise error("GetMultipleInterfaces did not return instances - got '%s', '%s'" % (i1, i2)) del i1 del i2 *************** *** 191,244 **** if rc[:-1] != ("def", 0, 1) or abs(rc[-1]-3.14)>.01: print(rc) ! raise error, "Did not get the optional values correctly" rc = o.TestOptionals("Hi", 2, 3, 1.1) if rc[:-1] != ("Hi", 2, 3) or abs(rc[-1]-1.1)>.01: print(rc) ! raise error, "Did not get the specified optional values correctly" rc = o.TestOptionals2(0) if rc != (0, "", 1): print(rc) ! raise error, "Did not get the optional2 values correctly" rc = o.TestOptionals2(1.1, "Hi", 2) if rc[1:] != ("Hi", 2) or abs(rc[0]-1.1)>.01: print(rc) ! raise error, "Did not get the specified optional2 values correctly" progress("Checking var args") o.SetVarArgs("Hi", "There", "From", "Python", 1) if o.GetLastVarArgs() != ("Hi", "There", "From", "Python", 1): ! raise error, "VarArgs failed -" + str(o.GetLastVarArgs()) progress("Checking getting/passing IUnknown") if o.GetSetUnknown(o) != o: ! raise error, "GetSetUnknown failed" progress("Checking getting/passing IDispatch") if type(o.GetSetDispatch(o)) !=types.InstanceType: ! raise error, "GetSetDispatch failed" progress("Checking getting/passing IDispatch of known type") if o.GetSetInterface(o).__class__ != o.__class__: ! raise error, "GetSetDispatch failed" if o.GetSetVariant(4) != 4: ! raise error, "GetSetVariant (int) failed" if o.GetSetVariant("foo") != "foo": ! raise error, "GetSetVariant (str) failed" if o.GetSetVariant(o) != o: ! raise error, "GetSetVariant (dispatch) failed" ! for l in sys.maxint, sys.maxint+1, 1 << 65L: if o.GetSetVariant(l) != l: ! raise error, "GetSetVariant (long) failed" if o.TestByRefVariant(2) != 4: ! raise error, "TestByRefVariant failed" if o.TestByRefString("Foo") != "FooFoo": ! raise error, "TestByRefString failed" # Pass some non-sequence objects to our array decoder, and watch it fail. try: o.SetVariantSafeArray("foo") ! raise error, "Expected a type error" except TypeError: pass try: o.SetVariantSafeArray(666) ! raise error, "Expected a type error" except TypeError: pass --- 191,244 ---- if rc[:-1] != ("def", 0, 1) or abs(rc[-1]-3.14)>.01: print(rc) ! raise error("Did not get the optional values correctly") rc = o.TestOptionals("Hi", 2, 3, 1.1) if rc[:-1] != ("Hi", 2, 3) or abs(rc[-1]-1.1)>.01: print(rc) ! raise error("Did not get the specified optional values correctly") rc = o.TestOptionals2(0) if rc != (0, "", 1): print(rc) ! raise error("Did not get the optional2 values correctly") rc = o.TestOptionals2(1.1, "Hi", 2) if rc[1:] != ("Hi", 2) or abs(rc[0]-1.1)>.01: print(rc) ! raise error("Did not get the specified optional2 values correctly") progress("Checking var args") o.SetVarArgs("Hi", "There", "From", "Python", 1) if o.GetLastVarArgs() != ("Hi", "There", "From", "Python", 1): ! raise error("VarArgs failed -" + str(o.GetLastVarArgs())) progress("Checking getting/passing IUnknown") if o.GetSetUnknown(o) != o: ! raise error("GetSetUnknown failed") progress("Checking getting/passing IDispatch") if type(o.GetSetDispatch(o)) !=types.InstanceType: ! raise error("GetSetDispatch failed") progress("Checking getting/passing IDispatch of known type") if o.GetSetInterface(o).__class__ != o.__class__: ! raise error("GetSetDispatch failed") if o.GetSetVariant(4) != 4: ! raise error("GetSetVariant (int) failed") if o.GetSetVariant("foo") != "foo": ! raise error("GetSetVariant (str) failed") if o.GetSetVariant(o) != o: ! raise error("GetSetVariant (dispatch) failed") ! for l in sys.maxint, sys.maxint+1, 1 << 65: if o.GetSetVariant(l) != l: ! raise error("GetSetVariant (long) failed") if o.TestByRefVariant(2) != 4: ! raise error("TestByRefVariant failed") if o.TestByRefString("Foo") != "FooFoo": ! raise error("TestByRefString failed") # Pass some non-sequence objects to our array decoder, and watch it fail. try: o.SetVariantSafeArray("foo") ! raise error("Expected a type error") except TypeError: pass try: o.SetVariantSafeArray(666) ! raise error("Expected a type error") except TypeError: pass *************** *** 272,283 **** TestApplyResult(o.Test6, (constants.WideAttr5,), constants.WideAttr5) ! TestConstant("ULongTest1", 0xFFFFFFFFL) ! TestConstant("ULongTest2", 0x7FFFFFFFL) ! TestConstant("LongTest1", -0x7FFFFFFFL) ! TestConstant("LongTest2", 0x7FFFFFFFL) TestConstant("UCharTest", 255) TestConstant("CharTest", -1) # 'Hello Loraine', but the 'r' is the "Registered" sign (\xae) ! TestConstant("StringTest", u"Hello Lo\xaeaine") now = pythoncom.MakeTime(time.gmtime(time.time())) --- 272,283 ---- TestApplyResult(o.Test6, (constants.WideAttr5,), constants.WideAttr5) ! TestConstant("ULongTest1", 0xFFFFFFFF) ! TestConstant("ULongTest2", 0x7FFFFFFF) ! TestConstant("LongTest1", -0x7FFFFFFF) ! TestConstant("LongTest2", 0x7FFFFFFF) TestConstant("UCharTest", 255) TestConstant("CharTest", -1) # 'Hello Loraine', but the 'r' is the "Registered" sign (\xae) ! TestConstant("StringTest", "Hello Lo\xaeaine") now = pythoncom.MakeTime(time.gmtime(time.time())) *************** *** 297,315 **** o.LongProp = 3 if o.LongProp != 3 or o.IntProp != 3: ! raise error, "Property value wrong - got %d/%d" % (o.LongProp,o.IntProp) o.LongProp = o.IntProp = -3 if o.LongProp != -3 or o.IntProp != -3: ! raise error, "Property value wrong - got %d/%d" % (o.LongProp,o.IntProp) check = 3 *10 **9 o.ULongProp = check if o.ULongProp != check: ! raise error, "Property value wrong - got %d (expected %d)" % (o.ULongProp, check) # currency. pythoncom.__future_currency__ = 1 if o.CurrencyProp != 0: ! raise error, "Expecting 0, got %r" % (o.CurrencyProp,) try: import decimal --- 297,315 ---- o.LongProp = 3 if o.LongProp != 3 or o.IntProp != 3: ! raise error("Property value wrong - got %d/%d" % (o.LongProp,o.IntProp)) o.LongProp = o.IntProp = -3 if o.LongProp != -3 or o.IntProp != -3: ! raise error("Property value wrong - got %d/%d" % (o.LongProp,o.IntProp)) check = 3 *10 **9 o.ULongProp = check if o.ULongProp != check: ! raise error("Property value wrong - got %d (expected %d)" % (o.ULongProp, check)) # currency. pythoncom.__future_currency__ = 1 if o.CurrencyProp != 0: ! raise error("Expecting 0, got %r" % (o.CurrencyProp,)) try: import decimal *************** *** 319,323 **** o.CurrencyProp = decimal.Decimal(val) if o.CurrencyProp != decimal.Decimal(val): ! raise error, "%s got %r" % (val, o.CurrencyProp) v1 = decimal.Decimal("1234.5678") TestApplyResult(o.DoubleCurrency, (v1,), v1*2) --- 319,323 ---- o.CurrencyProp = decimal.Decimal(val) if o.CurrencyProp != decimal.Decimal(val): ! raise error("%s got %r" % (val, o.CurrencyProp)) v1 = decimal.Decimal("1234.5678") TestApplyResult(o.DoubleCurrency, (v1,), v1*2) *************** *** 328,332 **** o.SetParamProp(0, 1) if o.ParamProp(0) != 1: ! raise RuntimeError, o.paramProp(0) # Do the connection point thing... --- 328,332 ---- o.SetParamProp(0, 1) if o.ParamProp(0) != 1: ! raise RuntimeError(o.paramProp(0)) # Do the connection point thing... *************** *** 351,355 **** def TestCounter(counter, bIsGenerated): # Test random access into container ! progress("Testing counter", `counter`) import random for i in xrange(50): --- 351,355 ---- def TestCounter(counter, bIsGenerated): # Test random access into container ! progress("Testing counter", repr(counter)) import random for i in xrange(50): *************** *** 358,364 **** ret = counter[num] if ret != num+1: ! raise error, "Random access into element %d failed - return was %s" % (num,`ret`) except IndexError: ! raise error, "** IndexError accessing collection element %d" % num num = 0 --- 358,364 ---- ret = counter[num] if ret != num+1: ! raise error("Random access into element %d failed - return was %s" % (num,repr(ret))) except IndexError: ! raise error("** IndexError accessing collection element %d" % num) num = 0 *************** *** 368,374 **** counter.SetTestProperty(1,2) if counter.TestPropertyWithDef != 0: ! raise error, "Unexpected property set value!" if counter.TestPropertyNoDef(1) != 1: ! raise error, "Unexpected property set value!" else: pass --- 368,374 ---- counter.SetTestProperty(1,2) if counter.TestPropertyWithDef != 0: ! raise error("Unexpected property set value!") if counter.TestPropertyNoDef(1) != 1: ! raise error("Unexpected property set value!") else: pass *************** *** 377,395 **** counter.LBound=1 counter.UBound=10 ! if counter.LBound <> 1 or counter.UBound<>10: print("** Error - counter did not keep its properties") if bIsGenerated: bounds = counter.GetBounds() ! if bounds[0]<>1 or bounds[1]<>10: ! raise error, "** Error - counter did not give the same properties back" counter.SetBounds(bounds[0], bounds[1]) for item in counter: num = num + 1 ! if num <> len(counter): ! raise error, "*** Length of counter and loop iterations dont match ***" ! if num <> 10: ! raise error, "*** Unexpected number of loop iterations ***" counter = counter._enum_.Clone() # Test Clone() and enum directly --- 377,395 ---- counter.LBound=1 counter.UBound=10 ! if counter.LBound != 1 or counter.UBound!=10: print("** Error - counter did not keep its properties") if bIsGenerated: bounds = counter.GetBounds() ! if bounds[0]!=1 or bounds[1]!=10: ! raise error("** Error - counter did not give the same properties back") counter.SetBounds(bounds[0], bounds[1]) for item in counter: num = num + 1 ! if num != len(counter): ! raise error("*** Length of counter and loop iterations dont match ***") ! if num != 10: ! raise error("*** Unexpected number of loop iterations ***") counter = counter._enum_.Clone() # Test Clone() and enum directly *************** *** 398,403 **** for item in counter: num = num + 1 ! if num <> 10: ! raise error, "*** Unexpected number of loop iterations - got %d ***" % num progress("Finished testing counter") --- 398,403 ---- for item in counter: num = num + 1 ! if num != 10: ! raise error("*** Unexpected number of loop iterations - got %d ***" % num) progress("Finished testing counter") Index: testCollections.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testCollections.py,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** testCollections.py 26 Nov 2008 09:03:29 -0000 1.4.4.1 --- testCollections.py 27 Nov 2008 04:58:41 -0000 1.4.4.2 *************** *** 34,42 **** for i in range(len(check)): if o(i) != check[i]: ! raise error("Using default method gave the incorrect value - %s/%s" % (`o(i)`, `check[i]`)) for i in range(len(check)): if o.Item(i) != check[i]: ! raise error("Using Item method gave the incorrect value - %s/%s" % (`o(i)`, `check[i]`)) # First try looping. --- 34,42 ---- for i in range(len(check)): if o(i) != check[i]: ! raise error("Using default method gave the incorrect value - %s/%s" % (repr(o(i)), repr(check[i]))) for i in range(len(check)): if o.Item(i) != check[i]: ! raise error("Using Item method gave the incorrect value - %s/%s" % (repr(o(i)), repr(check[i]))) # First try looping. *************** *** 46,50 **** if cmp[:len(check)] != check: ! raise error("Result after looping isnt correct - %s/%s" % (`cmp[:len(check)]`, `check`)) for i in range(len(check)): --- 46,50 ---- if cmp[:len(check)] != check: ! raise error("Result after looping isnt correct - %s/%s" % (repr(cmp[:len(check)]), repr(check))) for i in range(len(check)): Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/util.py,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -C2 -d -r1.9.2.3 -r1.9.2.4 *** util.py 26 Nov 2008 09:03:29 -0000 1.9.2.3 --- util.py 27 Nov 2008 04:58:41 -0000 1.9.2.4 *************** *** 7,11 **** import pythoncom import winerror ! import cStringIO as StringIO from pythoncom import _GetInterfaceCount, _GetGatewayCount import win32com --- 7,16 ---- import pythoncom import winerror ! ! try: ! import cStringIO as StringIO ! except: ! import io as StringIO ! from pythoncom import _GetInterfaceCount, _GetGatewayCount import win32com Index: testShell.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testShell.py,v retrieving revision 1.10.4.2 retrieving revision 1.10.4.3 diff -C2 -d -r1.10.4.2 -r1.10.4.3 *** testShell.py 26 Nov 2008 07:17:39 -0000 1.10.4.2 --- testShell.py 27 Nov 2008 04:58:41 -0000 1.10.4.3 *************** *** 161,165 **** ftLastWriteTime=pythoncom.MakeTime(12), nFileSize=sys_maxsize + 1), ! dict(cFileName=u"foo\xa9.txt", sizel=(1,2), pointl=(3,4), --- 161,165 ---- ftLastWriteTime=pythoncom.MakeTime(12), nFileSize=sys_maxsize + 1), ! dict(cFileName="foo\xa9.txt", sizel=(1,2), pointl=(3,4), Index: testMSOffice.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testMSOffice.py,v retrieving revision 1.7.4.2 retrieving revision 1.7.4.3 diff -C2 -d -r1.7.4.2 -r1.7.4.3 *** testMSOffice.py 26 Nov 2008 09:03:29 -0000 1.7.4.2 --- testMSOffice.py 27 Nov 2008 04:58:41 -0000 1.7.4.3 *************** *** 104,122 **** xl.Cells(i+1,i+1).Value = "Hi %d" % i ! if xl.Range("A1").Value <> "Hi 0": raise error("Single cell range failed") ! if xl.Range("A1:B1").Value <> ((Unicode("Hi 0"),2),): raise error("flat-horizontal cell range failed") ! if xl.Range("A1:A2").Value <> ((Unicode("Hi 0"),),(Unicode("x"),)): raise error("flat-vertical cell range failed") ! if xl.Range("A1:C3").Value <> ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))): raise error("square cell range failed") xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3)) ! if xl.Range("A1:C3").Value <> ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)): raise error("Range was not what I set it to!") --- 104,122 ---- xl.Cells(i+1,i+1).Value = "Hi %d" % i ! if xl.Range("A1").Value != "Hi 0": raise error("Single cell range failed") ! if xl.Range("A1:B1").Value != ((Unicode("Hi 0"),2),): raise error("flat-horizontal cell range failed") ! if xl.Range("A1:A2").Value != ((Unicode("Hi 0"),),(Unicode("x"),)): raise error("flat-vertical cell range failed") ! if xl.Range("A1:C3").Value != ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))): raise error("square cell range failed") xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3)) ! if xl.Range("A1:C3").Value != ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)): raise error("Range was not what I set it to!") Index: testGIT.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGIT.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 *** testGIT.py 26 Nov 2008 09:03:29 -0000 1.1.4.1 --- testGIT.py 27 Nov 2008 04:58:41 -0000 1.1.4.2 *************** *** 28,32 **** def TestInterp(interp): ! if interp.Eval("1+1") <> 2: raise ValueError("The interpreter returned the wrong result.") try: --- 28,32 ---- def TestInterp(interp): ! if interp.Eval("1+1") != 2: raise ValueError("The interpreter returned the wrong result.") try: Index: testDynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testDynamic.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** testDynamic.py 26 Nov 2008 09:03:29 -0000 1.3.4.1 --- testDynamic.py 27 Nov 2008 04:58:41 -0000 1.3.4.2 *************** *** 53,62 **** client.ANewAttr = "Hello" if client.ANewAttr != "Hello": ! raise error, "Could not set dynamic property" v = ["Hello","From","Python",1.4] client.TestSequence = v if v != list(client.TestSequence): ! raise error, "Dynamic sequences not working! %r/%r" % (repr(v), repr(client.testSequence)) client.write("This","output","has","come","via","COM") --- 53,62 ---- client.ANewAttr = "Hello" if client.ANewAttr != "Hello": ! raise error("Could not set dynamic property") v = ["Hello","From","Python",1.4] client.TestSequence = v if v != list(client.TestSequence): ! raise error("Dynamic sequences not working! %r/%r" % (repr(v), repr(client.testSequence))) client.write("This","output","has","come","via","COM") *************** *** 64,68 **** client._FlagAsMethod("NotReallyAMethod") if not callable(client.NotReallyAMethod): ! raise error, "Method I flagged as callable isn't!" --- 64,68 ---- client._FlagAsMethod("NotReallyAMethod") if not callable(client.NotReallyAMethod): ! raise error("Method I flagged as callable isn't!") Index: testClipboard.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testClipboard.py,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** testClipboard.py 26 Nov 2008 07:17:39 -0000 1.2.4.1 --- testClipboard.py 27 Nov 2008 04:58:41 -0000 1.2.4.2 *************** *** 50,54 **** elif cf == win32con.CF_UNICODETEXT: ret_stg = pythoncom.STGMEDIUM() ! ret_stg.set(pythoncom.TYMED_HGLOBAL, unicode(self.strval)) if ret_stg is None: --- 50,54 ---- elif cf == win32con.CF_UNICODETEXT: ret_stg = pythoncom.STGMEDIUM() ! ret_stg.set(pythoncom.TYMED_HGLOBAL, str(self.strval)) if ret_stg is None: *************** *** 116,120 **** # Now check unicode got = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) ! self.assertEqual(got, u"Hello from Python") win32clipboard.CloseClipboard() --- 116,120 ---- # Now check unicode got = win32clipboard.GetClipboardData(win32con.CF_UNICODETEXT) ! self.assertEqual(got, "Hello from Python") win32clipboard.CloseClipboard() Index: testDictionary.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testDictionary.py,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 *** testDictionary.py 26 Nov 2008 09:03:29 -0000 1.6.4.2 --- testDictionary.py 27 Nov 2008 04:58:41 -0000 1.6.4.3 *************** *** 20,24 **** for key, value in check.items(): if dict(key) != value: ! raise error("Indexing for '%s' gave the incorrect value - %s/%s" % (`key`, `dict[key]`, `check[key]`)) # Ensure we have the correct version registered. --- 20,24 ---- for key, value in check.items(): if dict(key) != value: ! raise error("Indexing for '%s' gave the incorrect value - %s/%s" % (repr(key), repr(dict[key]), repr(check[key]))) # Ensure we have the correct version registered. |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32comext/adsi Modified Files: Tag: py3k adsicon.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: adsicon.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/adsicon.py,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** adsicon.py 26 May 2005 11:39:17 -0000 1.3 --- adsicon.py 27 Nov 2008 04:58:41 -0000 1.3.4.1 *************** *** 242,248 **** E_ADS_SCHEMA_VIOLATION = _HRESULT_TYPEDEF_((-2147463153)) E_ADS_COLUMN_NOT_SET = _HRESULT_TYPEDEF_((-2147463152)) ! S_ADS_ERRORSOCCURRED = _HRESULT_TYPEDEF_(0x00005011L) ! S_ADS_NOMORE_ROWS = _HRESULT_TYPEDEF_(0x00005012L) ! S_ADS_NOMORE_COLUMNS = _HRESULT_TYPEDEF_(0x00005013L) E_ADS_INVALID_FILTER = _HRESULT_TYPEDEF_((-2147463148)) --- 242,248 ---- E_ADS_SCHEMA_VIOLATION = _HRESULT_TYPEDEF_((-2147463153)) E_ADS_COLUMN_NOT_SET = _HRESULT_TYPEDEF_((-2147463152)) ! S_ADS_ERRORSOCCURRED = _HRESULT_TYPEDEF_(0x00005011) ! S_ADS_NOMORE_ROWS = _HRESULT_TYPEDEF_(0x00005012) ! S_ADS_NOMORE_COLUMNS = _HRESULT_TYPEDEF_(0x00005013) E_ADS_INVALID_FILTER = _HRESULT_TYPEDEF_((-2147463148)) |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/win32/test Modified Files: Tag: py3k test_win32rcparser.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: test_win32rcparser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32rcparser.py,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** test_win32rcparser.py 4 Jul 2008 01:55:13 -0000 1.3 --- test_win32rcparser.py 27 Nov 2008 04:58:42 -0000 1.3.2.1 *************** *** 60,64 **** # poor-man's import :) globs = {} ! exec py_source in globs, globs self.resources = globs["FakeParser"]() --- 60,64 ---- # poor-man's import :) globs = {} ! exec(py_source, globs, globs) self.resources = globs["FakeParser"]() |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:48
|
Update of /cvsroot/pywin32/pywin32/win32/scripts In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/win32/scripts Modified Files: Tag: py3k ControlService.py rasutil.py regsetup.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: ControlService.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/ControlService.py,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ControlService.py 2 Sep 1999 00:19:32 -0000 1.1 --- ControlService.py 27 Nov 2008 04:58:42 -0000 1.1.4.1 *************** *** 163,167 **** self.listCtrl.SetRedraw(1) ! def OnListEvent(self, id, code): if code == win32con.LBN_SELCHANGE or code == win32con.LBN_SELCANCEL: pos = self.listCtrl.GetCurSel() --- 163,167 ---- self.listCtrl.SetRedraw(1) ! def OnListEvent(self, id, code): if code == win32con.LBN_SELCHANGE or code == win32con.LBN_SELCANCEL: pos = self.listCtrl.GetCurSel() *************** *** 184,188 **** return self.data[pos][-2:] ! def OnStartCmd(self, id, code): service = self.GetSelService() if not service: --- 184,188 ---- return self.data[pos][-2:] ! def OnStartCmd(self, id, code): service = self.GetSelService() if not service: *************** *** 193,197 **** self.ReloadData() ! def OnStopCmd(self, id, code): service = self.GetSelService() if not service: --- 193,197 ---- self.ReloadData() ! def OnStopCmd(self, id, code): service = self.GetSelService() if not service: *************** *** 202,206 **** self.ReloadData() ! def OnPauseCmd(self, id, code): service = self.GetSelService() if not service: --- 202,206 ---- self.ReloadData() ! def OnPauseCmd(self, id, code): service = self.GetSelService() if not service: *************** *** 211,215 **** self.ReloadData() ! def OnContinueCmd(self, id, code): service = self.GetSelService() if not service: --- 211,215 ---- self.ReloadData() ! def OnContinueCmd(self, id, code): service = self.GetSelService() if not service: *************** *** 220,224 **** self.ReloadData() ! def OnStartupCmd(self, id, code): service = self.GetSelService() if not service: --- 220,224 ---- self.ReloadData() ! def OnStartupCmd(self, id, code): service = self.GetSelService() if not service: Index: regsetup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/regsetup.py,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -C2 -d -r1.15.2.1 -r1.15.2.2 *** regsetup.py 26 Nov 2008 09:03:30 -0000 1.15.2.1 --- regsetup.py 27 Nov 2008 04:58:42 -0000 1.15.2.2 *************** *** 168,172 **** dlg = win32ui.CreateFileDialog(1,None,fileName,flags,filter,None) dlg.SetOFNTitle("Locate " + fileName) ! if dlg.DoModal() <> win32con.IDOK: raise KeyboardInterrupt("User cancelled the process") retPath = dlg.GetPathName() --- 168,172 ---- dlg = win32ui.CreateFileDialog(1,None,fileName,flags,filter,None) dlg.SetOFNTitle("Locate " + fileName) ! if dlg.DoModal() != win32con.IDOK: raise KeyboardInterrupt("User cancelled the process") retPath = dlg.GetPathName() *************** *** 505,509 **** if newPath not in currentPaths: currentPaths.append(newPath) ! if len(currentPaths)<>oldLen: print("Registering %d new core paths" % (len(currentPaths)-oldLen)) regutil.RegisterNamedPath(None,string.join(currentPaths,";")) --- 505,509 ---- if newPath not in currentPaths: currentPaths.append(newPath) ! if len(currentPaths)!=oldLen: print("Registering %d new core paths" % (len(currentPaths)-oldLen)) regutil.RegisterNamedPath(None,string.join(currentPaths,";")) Index: rasutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/rasutil.py,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** rasutil.py 26 Nov 2008 09:03:30 -0000 1.2.4.1 --- rasutil.py 27 Nov 2008 04:58:42 -0000 1.2.4.2 *************** *** 77,81 **** Usage(why) retries = 5 ! if len(args) <> 0: Usage("Invalid argument") --- 77,81 ---- Usage(why) retries = 5 ! if len(args) != 0: Usage("Invalid argument") |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:47
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32comext/axscript/test Modified Files: Tag: py3k leakTest.py testHost.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: testHost.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/test/testHost.py,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** testHost.py 26 Nov 2008 09:03:30 -0000 1.5.2.2 --- testHost.py 27 Nov 2008 04:58:41 -0000 1.5.2.3 *************** *** 148,152 **** got_name = state_map.get(got, str(got)) state_name = state_map.get(state, str(state)) ! raise RuntimeError, "Warning - engine %s has state %s, but expected %s" % (name, got_name, state_name) class EngineTester(win32com.test.util.TestCase): --- 148,152 ---- got_name = state_map.get(got, str(got)) state_name = state_map.get(state, str(state)) ! raise RuntimeError("Warning - engine %s has state %s, but expected %s" % (name, got_name, state_name)) class EngineTester(win32com.test.util.TestCase): Index: leakTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/test/leakTest.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 *** leakTest.py 26 Nov 2008 09:03:30 -0000 1.1.4.1 --- leakTest.py 27 Nov 2008 04:58:41 -0000 1.1.4.2 *************** *** 132,139 **** return if echoer.last != "Goober": ! print("***** Function call didnt set value correctly", `echoer.last`) if str(ob.prop) != "Property Value": ! print("***** Property Value not correct - ", `ob.prop`) ob.testcollection() --- 132,139 ---- return if echoer.last != "Goober": ! print("***** Function call didnt set value correctly", repr(echoer.last)) if str(ob.prop) != "Property Value": ! print("***** Property Value not correct - ", repr(ob.prop)) ob.testcollection() |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:47
|
Update of /cvsroot/pywin32/pywin32/com/win32com/demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32com/demos Modified Files: Tag: py3k connect.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: connect.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/connect.py,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** connect.py 26 Nov 2008 09:03:29 -0000 1.2.4.2 --- connect.py 27 Nov 2008 04:58:41 -0000 1.2.4.3 *************** *** 58,62 **** raise RuntimeError("Sent %r, but got back %r" % (val, client.last_event_arg)) if verbose: ! print "Sent and received %r" % val # A simple test script for all this. --- 58,62 ---- raise RuntimeError("Sent %r, but got back %r" % (val, client.last_event_arg)) if verbose: ! print("Sent and received %r" % val) # A simple test script for all this. *************** *** 71,80 **** connection.Connect(server, client, IID_IConnectDemoEvents) CheckEvent(server, client, "Hello", verbose) ! CheckEvent(server, client, "Here is a null>"+chr(0)+"<", verbose) ! CheckEvent(server, client, u"Here is a null>"+unichr(0)+"<", verbose) ! val = u"test-\xe0\xf2" # 2 extended characters. CheckEvent(server, client, val, verbose) if verbose: ! print "Everything seemed to work!" # Aggressive memory leak checking (ie, do nothing!) :-) All should cleanup OK??? --- 71,80 ---- connection.Connect(server, client, IID_IConnectDemoEvents) CheckEvent(server, client, "Hello", verbose) ! CheckEvent(server, client, b"Here is a null>\x00<", verbose) ! CheckEvent(server, client, "Here is a null>\x00<", verbose) ! val = "test-\xe0\xf2" # 2 extended characters. CheckEvent(server, client, val, verbose) if verbose: ! print("Everything seemed to work!") # Aggressive memory leak checking (ie, do nothing!) :-) All should cleanup OK??? |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:47
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32com/client Modified Files: Tag: py3k genpy.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.55.2.3 retrieving revision 1.55.2.4 diff -C2 -d -r1.55.2.3 -r1.55.2.4 *** genpy.py 26 Nov 2008 07:17:39 -0000 1.55.2.3 --- genpy.py 27 Nov 2008 04:58:41 -0000 1.55.2.4 *************** *** 212,218 **** val = vdesc[1] if sys.version_info <= (2,4) and (isinstance(val, int) or isinstance(val, long)): ! if val==0x80000000L: # special case use = "0x80000000L" # 'L' for future warning ! elif val > 0x80000000L or val < 0: # avoid a FutureWarning use = long(val) else: --- 212,218 ---- val = vdesc[1] if sys.version_info <= (2,4) and (isinstance(val, int) or isinstance(val, long)): ! if val==0x80000000: # special case use = "0x80000000L" # 'L' for future warning ! elif val > 0x80000000 or val < 0: # avoid a FutureWarning use = long(val) else: |
From: Mark H. <mha...@us...> - 2008-11-27 04:58:47
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1302/com/win32com/servers Modified Files: Tag: py3k PythonTools.py dictionary.py interp.py Log Message: Almost all files in py3k branch are now in py3k syntax - but work remains Index: interp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/interp.py,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** interp.py 26 Nov 2008 09:03:29 -0000 1.2.4.1 --- interp.py 27 Nov 2008 04:58:41 -0000 1.2.4.2 *************** *** 43,47 **** if type(exp) not in [type(''), UnicodeType]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) ! exec str(exp) in self.dict def Register(): --- 43,47 ---- if type(exp) not in [type(''), UnicodeType]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) ! exec(str(exp), self.dict) def Register(): Index: PythonTools.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/PythonTools.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** PythonTools.py 26 Nov 2008 09:03:29 -0000 1.3.4.1 --- PythonTools.py 27 Nov 2008 04:58:41 -0000 1.3.4.2 *************** *** 18,22 **** def echo(self, arg): ! return `arg` def sleep(self, t): --- 18,22 ---- def echo(self, arg): ! return repr(arg) def sleep(self, t): Index: dictionary.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/dictionary.py,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** dictionary.py 16 Oct 2000 02:36:15 -0000 1.3 --- dictionary.py 27 Nov 2008 04:58:41 -0000 1.3.4.1 *************** *** 44,48 **** UnicodeType = pywintypes.UnicodeType ! StringType = types.StringType --- 44,48 ---- UnicodeType = pywintypes.UnicodeType ! StringType = bytes *************** *** 97,101 **** return None # unknown keys return None (VT_NULL) ! if l <> 2: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) if args[1] is None: --- 97,101 ---- return None # unknown keys return None (VT_NULL) ! if l != 2: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) if args[1] is None: |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/win32/Demos Modified Files: rastest.py Log Message: Modernize != syntax (ie, remove old '<>' Index: rastest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/rastest.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rastest.py 3 Feb 2003 00:30:29 -0000 1.3 --- rastest.py 27 Nov 2008 04:15:21 -0000 1.4 *************** *** 69,73 **** # hras, rc = win32ras.Dial(None, None, (entryName, ),theCallback) # print hras, rc ! if not bUseCallback and rc <> 0: print "Could not dial the RAS connection:", win32ras.GetErrorString(rc) hras = HangUp( hras ) --- 69,73 ---- # hras, rc = win32ras.Dial(None, None, (entryName, ),theCallback) # print hras, rc ! if not bUseCallback and rc != 0: print "Could not dial the RAS connection:", win32ras.GetErrorString(rc) hras = HangUp( hras ) |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/security In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/win32/Demos/security Modified Files: GetTokenInformation.py Log Message: Modernize != syntax (ie, remove old '<>' Index: GetTokenInformation.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/GetTokenInformation.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GetTokenInformation.py 2 Aug 2007 07:08:18 -0000 1.1 --- GetTokenInformation.py 27 Nov 2008 04:15:21 -0000 1.2 *************** *** 58,62 **** elevation_type = win32security.GetTokenInformation(th, win32security.TokenElevationType) print 'TokenElevationType:', elevation_type, TOKEN_ELEVATION_TYPE.lookup_name(elevation_type) ! if elevation_type<>win32security.TokenElevationTypeDefault: lt=win32security.GetTokenInformation(th, win32security.TokenLinkedToken) print 'TokenLinkedToken:', lt --- 58,62 ---- elevation_type = win32security.GetTokenInformation(th, win32security.TokenElevationType) print 'TokenElevationType:', elevation_type, TOKEN_ELEVATION_TYPE.lookup_name(elevation_type) ! if elevation_type!=win32security.TokenElevationTypeDefault: lt=win32security.GetTokenInformation(th, win32security.TokenLinkedToken) print 'TokenLinkedToken:', lt |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/win32/scripts In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/win32/scripts Modified Files: rasutil.py regsetup.py Log Message: Modernize != syntax (ie, remove old '<>' Index: regsetup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/regsetup.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** regsetup.py 26 Nov 2008 08:56:33 -0000 1.16 --- regsetup.py 27 Nov 2008 04:15:21 -0000 1.17 *************** *** 168,172 **** dlg = win32ui.CreateFileDialog(1,None,fileName,flags,filter,None) dlg.SetOFNTitle("Locate " + fileName) ! if dlg.DoModal() <> win32con.IDOK: raise KeyboardInterrupt("User cancelled the process") retPath = dlg.GetPathName() --- 168,172 ---- dlg = win32ui.CreateFileDialog(1,None,fileName,flags,filter,None) dlg.SetOFNTitle("Locate " + fileName) ! if dlg.DoModal() != win32con.IDOK: raise KeyboardInterrupt("User cancelled the process") retPath = dlg.GetPathName() *************** *** 505,509 **** if newPath not in currentPaths: currentPaths.append(newPath) ! if len(currentPaths)<>oldLen: print "Registering %d new core paths" % (len(currentPaths)-oldLen) regutil.RegisterNamedPath(None,string.join(currentPaths,";")) --- 505,509 ---- if newPath not in currentPaths: currentPaths.append(newPath) ! if len(currentPaths)!=oldLen: print "Registering %d new core paths" % (len(currentPaths)-oldLen) regutil.RegisterNamedPath(None,string.join(currentPaths,";")) Index: rasutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/rasutil.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rasutil.py 16 Oct 2000 05:33:04 -0000 1.2 --- rasutil.py 27 Nov 2008 04:15:21 -0000 1.3 *************** *** 77,81 **** Usage(why) retries = 5 ! if len(args) <> 0: Usage("Invalid argument") --- 77,81 ---- Usage(why) retries = 5 ! if len(args) != 0: Usage("Invalid argument") |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/com/win32com/test Modified Files: policySemantics.py testGIT.py testMSOffice.py testPyComTest.py Log Message: Modernize != syntax (ie, remove old '<>' Index: testMSOffice.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testMSOffice.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testMSOffice.py 26 Nov 2008 08:52:32 -0000 1.9 --- testMSOffice.py 27 Nov 2008 04:15:21 -0000 1.10 *************** *** 104,122 **** xl.Cells(i+1,i+1).Value = "Hi %d" % i ! if xl.Range("A1").Value <> "Hi 0": raise error("Single cell range failed") ! if xl.Range("A1:B1").Value <> ((Unicode("Hi 0"),2),): raise error("flat-horizontal cell range failed") ! if xl.Range("A1:A2").Value <> ((Unicode("Hi 0"),),(Unicode("x"),)): raise error("flat-vertical cell range failed") ! if xl.Range("A1:C3").Value <> ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))): raise error("square cell range failed") xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3)) ! if xl.Range("A1:C3").Value <> ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)): raise error("Range was not what I set it to!") --- 104,122 ---- xl.Cells(i+1,i+1).Value = "Hi %d" % i ! if xl.Range("A1").Value != "Hi 0": raise error("Single cell range failed") ! if xl.Range("A1:B1").Value != ((Unicode("Hi 0"),2),): raise error("flat-horizontal cell range failed") ! if xl.Range("A1:A2").Value != ((Unicode("Hi 0"),),(Unicode("x"),)): raise error("flat-vertical cell range failed") ! if xl.Range("A1:C3").Value != ((Unicode("Hi 0"),2,3),(Unicode("x"),Unicode("Hi 1"),Unicode("z")),(3,2,Unicode("Hi 2"))): raise error("square cell range failed") xl.Range("A1:C3").Value =((3,2,1),("x","y","z"),(1,2,3)) ! if xl.Range("A1:C3").Value != ((3,2,1),(Unicode("x"),Unicode("y"),Unicode("z")),(1,2,3)): raise error("Range was not what I set it to!") Index: testGIT.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGIT.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testGIT.py 26 Nov 2008 08:52:32 -0000 1.2 --- testGIT.py 27 Nov 2008 04:15:21 -0000 1.3 *************** *** 28,32 **** def TestInterp(interp): ! if interp.Eval("1+1") <> 2: raise ValueError("The interpreter returned the wrong result.") try: --- 28,32 ---- def TestInterp(interp): ! if interp.Eval("1+1") != 2: raise ValueError("The interpreter returned the wrong result.") try: Index: policySemantics.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/policySemantics.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** policySemantics.py 27 Nov 2008 04:05:54 -0000 1.8 --- policySemantics.py 27 Nov 2008 04:15:21 -0000 1.9 *************** *** 49,53 **** break dispids.sort() ! if dispids <> [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]: raise Error("Got back the wrong dispids: %s" % dispids) --- 49,53 ---- break dispids.sort() ! if dispids != [pythoncom.DISPID_EVALUATE, pythoncom.DISPID_NEWENUM, 10, 11, 1000]: raise Error("Got back the wrong dispids: %s" % dispids) Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** testPyComTest.py 27 Nov 2008 03:53:25 -0000 1.36 --- testPyComTest.py 27 Nov 2008 04:15:21 -0000 1.37 *************** *** 377,386 **** counter.LBound=1 counter.UBound=10 ! if counter.LBound <> 1 or counter.UBound<>10: print "** Error - counter did not keep its properties" if bIsGenerated: bounds = counter.GetBounds() ! if bounds[0]<>1 or bounds[1]<>10: raise error("** Error - counter did not give the same properties back") counter.SetBounds(bounds[0], bounds[1]) --- 377,386 ---- counter.LBound=1 counter.UBound=10 ! if counter.LBound != 1 or counter.UBound!=10: print "** Error - counter did not keep its properties" if bIsGenerated: bounds = counter.GetBounds() ! if bounds[0]!=1 or bounds[1]!=10: raise error("** Error - counter did not give the same properties back") counter.SetBounds(bounds[0], bounds[1]) *************** *** 388,394 **** for item in counter: num = num + 1 ! if num <> len(counter): raise error("*** Length of counter and loop iterations dont match ***") ! if num <> 10: raise error("*** Unexpected number of loop iterations ***") --- 388,394 ---- for item in counter: num = num + 1 ! if num != len(counter): raise error("*** Length of counter and loop iterations dont match ***") ! if num != 10: raise error("*** Unexpected number of loop iterations ***") *************** *** 398,402 **** for item in counter: num = num + 1 ! if num <> 10: raise error("*** Unexpected number of loop iterations - got %d ***" % num) progress("Finished testing counter") --- 398,402 ---- for item in counter: num = num + 1 ! if num != 10: raise error("*** Unexpected number of loop iterations - got %d ***" % num) progress("Finished testing counter") |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/win32/Lib Modified Files: win32serviceutil.py Log Message: Modernize != syntax (ie, remove old '<>' Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** win32serviceutil.py 26 Nov 2008 08:39:33 -0000 1.28 --- win32serviceutil.py 27 Nov 2008 04:15:21 -0000 1.29 *************** *** 608,612 **** DebugService(cls, args) ! if not knownArg and len(args)<>1: usage() # the rest of the cmds don't take addn args --- 608,612 ---- DebugService(cls, args) ! if not knownArg and len(args)!=1: usage() # the rest of the cmds don't take addn args |
From: Mark H. <mha...@us...> - 2008-11-27 04:15:27
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32320/com/win32com/servers Modified Files: dictionary.py Log Message: Modernize != syntax (ie, remove old '<>' Index: dictionary.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/dictionary.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dictionary.py 16 Oct 2000 02:36:15 -0000 1.3 --- dictionary.py 27 Nov 2008 04:15:21 -0000 1.4 *************** *** 97,101 **** return None # unknown keys return None (VT_NULL) ! if l <> 2: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) if args[1] is None: --- 97,101 ---- return None # unknown keys return None (VT_NULL) ! if l != 2: raise COMException(scode=winerror.DISP_E_BADPARAMCOUNT) if args[1] is None: |
From: Mark H. <mha...@us...> - 2008-11-27 04:06:00
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31996/com/win32com/server Modified Files: dispatcher.py Log Message: fix a couple of over-anxious raise modernizations! Index: dispatcher.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/dispatcher.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dispatcher.py 27 Nov 2008 03:53:25 -0000 1.8 --- dispatcher.py 27 Nov 2008 04:05:54 -0000 1.9 *************** *** 127,131 **** traceback.print_exc() # But still raise it for the framework. ! reraise() def _trace_(self, *args): --- 127,131 ---- traceback.print_exc() # But still raise it for the framework. ! raise def _trace_(self, *args): *************** *** 262,279 **** # But still raise it. del tb ! reraise() ! ! def reraise(): ! """Handy function for re-raising errors. ! ! Note: storing a traceback in a local variable can introduce reference ! loops if you aren't careful. Specifically, that local variable should ! not be within an execution context contained with the traceback. ! ! By using a utility function, we ensure that our local variable holding ! the traceback is not referenced by the traceback itself. ! """ ! t, v, tb = exc_info() ! raise t(v).with_traceback(tb) try: --- 262,266 ---- # But still raise it. del tb ! raise try: |
From: Mark H. <mha...@us...> - 2008-11-27 04:06:00
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31996/com/win32com/test Modified Files: policySemantics.py Log Message: fix a couple of over-anxious raise modernizations! Index: policySemantics.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/policySemantics.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** policySemantics.py 27 Nov 2008 03:53:25 -0000 1.7 --- policySemantics.py 27 Nov 2008 04:05:54 -0000 1.8 *************** *** 65,69 **** rc = dispob.Invoke(pythoncom.DISPID_EVALUATE, 0, pythoncom.DISPATCH_METHOD|pythoncom.DISPATCH_PROPERTYGET, 1) if rc != 6: ! raise Error("Evaluate returned").with_traceback(rc) --- 65,69 ---- rc = dispob.Invoke(pythoncom.DISPID_EVALUATE, 0, pythoncom.DISPATCH_METHOD|pythoncom.DISPATCH_PROPERTYGET, 1) if rc != 6: ! raise Error("Evaluate returned %d" % rc) |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:37
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/app In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/pythonwin/pywin/Demos/app Modified Files: basictimerapp.py Log Message: Replace backticks with explicit repr() calls. Index: basictimerapp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/app/basictimerapp.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** basictimerapp.py 9 Aug 2008 16:46:40 -0000 1.4 --- basictimerapp.py 27 Nov 2008 03:53:25 -0000 1.5 *************** *** 113,117 **** except: t, v, tb = sys.exc_info() ! str = "Failed: %s: %s" % (t, `v`) print str self.oldErr.write(str) --- 113,117 ---- except: t, v, tb = sys.exc_info() ! str = "Failed: %s: %s" % (t, repr(v)) print str self.oldErr.write(str) |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:36
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/com/win32comext/axscript/client Modified Files: error.py Log Message: Replace backticks with explicit repr() calls. Index: error.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/error.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** error.py 26 Nov 2008 01:49:44 -0000 1.10 --- error.py 27 Nov 2008 03:53:25 -0000 1.11 *************** *** 231,236 **** except pythoncom.com_error, details: print "**OnScriptError failed:", details ! print "Exception description:'%s'" % (`exceptionInstance.description`) ! print "Exception text:'%s'" % (`exceptionInstance.linetext`) result = winerror.S_FALSE --- 231,236 ---- except pythoncom.com_error, details: print "**OnScriptError failed:", details ! print "Exception description:'%s'" % (repr(exceptionInstance.description)) ! print "Exception text:'%s'" % (repr(exceptionInstance.linetext)) result = winerror.S_FALSE |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:34
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/pythonwin/pywin/framework Modified Files: sgrepmdi.py Log Message: Replace backticks with explicit repr() calls. Index: sgrepmdi.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/sgrepmdi.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sgrepmdi.py 26 Nov 2008 08:39:32 -0000 1.8 --- sgrepmdi.py 27 Nov 2008 03:53:25 -0000 1.9 *************** *** 234,238 **** self.GetFirstView().Append('#Search '+self.dirpattern+'\n') if self.verbose: ! self.GetFirstView().Append('# ='+`self.dp.dirs`+'\n') self.GetFirstView().Append('# Files '+self.filpattern+'\n') self.GetFirstView().Append('# For '+self.greppattern+'\n') --- 234,238 ---- self.GetFirstView().Append('#Search '+self.dirpattern+'\n') if self.verbose: ! self.GetFirstView().Append('# ='+repr(self.dp.dirs)+'\n') self.GetFirstView().Append('# Files '+self.filpattern+'\n') self.GetFirstView().Append('# For '+self.greppattern+'\n') *************** *** 263,267 **** line = lines[i] if self.pat.search(line) != None: ! self.GetFirstView().Append(f+'('+`i+1` + ') '+line) else: self.fndx = -1 --- 263,267 ---- line = lines[i] if self.pat.search(line) != None: ! self.GetFirstView().Append(f+'('+repr(i+1) + ') '+line) else: self.fndx = -1 *************** *** 285,289 **** def GetParams(self): ! return self.dirpattern+'\t'+self.filpattern+'\t'+self.greppattern+'\t'+`self.casesensitive`+'\t'+`self.recurse`+'\t'+`self.verbose` def OnSaveDocument(self, filename): --- 285,289 ---- def GetParams(self): ! return self.dirpattern+'\t'+self.filpattern+'\t'+self.greppattern+'\t'+repr(self.casesensitive)+'\t'+repr(self.recurse)+'\t'+repr(self.verbose) def OnSaveDocument(self, filename): *************** *** 458,462 **** items = items + newitems for item in items: ! win32api.WriteProfileVal(section, `i`, item, ini) i = i + 1 self.UpdateData(0) --- 458,462 ---- items = items + newitems for item in items: ! win32api.WriteProfileVal(section, repr(i), item, ini) i = i + 1 self.UpdateData(0) |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:34
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/pythonwin/pywin/scintilla Modified Files: IDLEenvironment.py config.py keycodes.py Log Message: Replace backticks with explicit repr() calls. Index: config.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/config.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.py 9 Aug 2008 16:47:07 -0000 1.6 --- config.py 27 Nov 2008 03:53:25 -0000 1.7 *************** *** 37,41 **** if sep_pos == -1: if line.strip(): ! print "Warning: Line %d: %s is an invalid entry" % (lineno, `line`) return None, None return "", "" --- 37,41 ---- if sep_pos == -1: if line.strip(): ! print "Warning: Line %d: %s is an invalid entry" % (lineno, repr(line)) return None, None return "", "" Index: IDLEenvironment.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/IDLEenvironment.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** IDLEenvironment.py 26 Nov 2008 01:32:59 -0000 1.13 --- IDLEenvironment.py 27 Nov 2008 03:53:25 -0000 1.14 *************** *** 453,457 **** got = t.get(fr, to) if got != expected: ! print "ERROR: get(%s, %s) expected %s, but got %s" % (`fr`, `to`, `expected`, `got`) def test(): --- 453,457 ---- got = t.get(fr, to) if got != expected: ! print "ERROR: get(%s, %s) expected %s, but got %s" % (repr(fr), repr(to), repr(expected), repr(got)) def test(): Index: keycodes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/keycodes.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** keycodes.py 9 Aug 2008 16:47:07 -0000 1.5 --- keycodes.py 27 Nov 2008 03:53:25 -0000 1.6 *************** *** 126,130 **** def _psc(char): sc = get_scan_code(char) ! print "Char %s -> %d -> %s" % (`char`, sc, key_code_to_name.get(sc)) def test1(): --- 126,130 ---- def _psc(char): sc = get_scan_code(char) ! print "Char %s -> %d -> %s" % (repr(char), sc, key_code_to_name.get(sc)) def test1(): |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:31
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/pythonwin/pywin/idle Modified Files: AutoIndent.py CallTips.py Log Message: Replace backticks with explicit repr() calls. Index: CallTips.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/CallTips.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CallTips.py 9 Aug 2008 16:47:07 -0000 1.3 --- CallTips.py 27 Nov 2008 03:53:25 -0000 1.4 *************** *** 188,192 **** if get_arg_text(t) != expected: failed.append(t) ! print "%s - expected %s, but got %s" % (t, `expected`, `get_arg_text(t)`) print "%d of %d tests failed" % (len(failed), len(tests)) --- 188,192 ---- if get_arg_text(t) != expected: failed.append(t) ! print "%s - expected %s, but got %s" % (t, repr(expected), repr(get_arg_text(t))) print "%d of %d tests failed" % (len(failed), len(tests)) Index: AutoIndent.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/AutoIndent.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AutoIndent.py 26 Nov 2008 01:32:59 -0000 1.5 --- AutoIndent.py 27 Nov 2008 03:53:25 -0000 1.6 *************** *** 127,131 **** self.context_use_ps1 = value else: ! raise KeyError("bad option name: %s" % `key`) # If ispythonsource and guess are true, guess a good value for --- 127,131 ---- self.context_use_ps1 = value else: ! raise KeyError("bad option name: %s" % repr(key)) # If ispythonsource and guess are true, guess a good value for *************** *** 255,259 **** for context in self.num_context_lines: startat = max(lno - context, 1) ! startatindex = `startat` + ".0" rawtext = text.get(startatindex, "insert") y.set_str(rawtext) --- 255,259 ---- for context in self.num_context_lines: startat = max(lno - context, 1) ! startatindex = repr(startat) + ".0" rawtext = text.get(startatindex, "insert") y.set_str(rawtext) *************** *** 287,291 **** self.reindent_to(y.compute_backslash_indent()) else: ! assert 0, "bogus continuation type " + `c` return "break" --- 287,291 ---- self.reindent_to(y.compute_backslash_indent()) else: ! assert 0, "bogus continuation type " + repr(c) return "break" |
From: Mark H. <mha...@us...> - 2008-11-27 03:53:31
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/win32wnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31031/win32/Demos/win32wnet Modified Files: testwnet.py Log Message: Replace backticks with explicit repr() calls. Index: testwnet.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32wnet/testwnet.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testwnet.py 23 Oct 2008 07:39:12 -0000 1.4 --- testwnet.py 27 Nov 2008 03:53:25 -0000 1.5 *************** *** 66,70 **** def TestGetUser(): u = win32wnet.WNetGetUser() ! print "Current global user is", `u` if u != win32wnet.WNetGetUser(None): raise RuntimeError("Default value didnt seem to work!") --- 66,70 ---- def TestGetUser(): u = win32wnet.WNetGetUser() ! print "Current global user is", repr(u) if u != win32wnet.WNetGetUser(None): raise RuntimeError("Default value didnt seem to work!") |