pywin32-checkins Mailing List for Python for Windows Extensions (Page 64)
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-10-02 12:10:04
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16045/win32/test Modified Files: test_exceptions.py Log Message: various py3k compatible syntax modernizations merged from py3k branch; unnecessary 'L' suffixes, raise exceptions as objects, types module, etc Index: test_exceptions.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_exceptions.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_exceptions.py 1 Oct 2008 06:49:31 -0000 1.3 --- test_exceptions.py 2 Oct 2008 12:09:53 -0000 1.4 *************** *** 7,12 **** class TestBase(unittest.TestCase): def _testExceptionIndex(self, exc, index, expected): ! # check the exception itself can be indexed. ! self.failUnlessEqual(exc[index], expected) # and that exception.args can is the same. self.failUnlessEqual(exc.args[index], expected) --- 7,13 ---- class TestBase(unittest.TestCase): def _testExceptionIndex(self, exc, index, expected): ! # check the exception itself can be indexed if not py3k ! if sys.version_info < (3,): ! self.failUnlessEqual(exc[index], expected) # and that exception.args can is the same. self.failUnlessEqual(exc.args[index], expected) *************** *** 58,62 **** # early on the result actually *was* a tuple - it must be able to be one err_tuple = (winerror.ERROR_INVALID_HANDLE, 'CloseHandle', err_msg) ! self.failUnlessEqual(tuple(exc), err_tuple) def testClassName(self): --- 59,66 ---- # early on the result actually *was* a tuple - it must be able to be one err_tuple = (winerror.ERROR_INVALID_HANDLE, 'CloseHandle', err_msg) ! if sys.version_info < (3,): ! self.failUnlessEqual(tuple(exc), err_tuple) ! else: ! self.failUnlessEqual(exc.args, err_tuple) def testClassName(self): *************** *** 114,118 **** # early on the result actually *was* a tuple - it must be able to be one err_tuple = (winerror.STG_E_INVALIDFLAG, err_msg, None, None) ! self.failUnlessEqual(tuple(exc), err_tuple) def testClassName(self): --- 118,125 ---- # early on the result actually *was* a tuple - it must be able to be one err_tuple = (winerror.STG_E_INVALIDFLAG, err_msg, None, None) ! if sys.version_info < (3,): ! self.failUnlessEqual(tuple(exc), err_tuple) ! else: ! self.failUnlessEqual(exc.args, err_tuple) def testClassName(self): |
From: Mark H. <mha...@us...> - 2008-10-02 12:10:04
|
Update of /cvsroot/pywin32/pywin32/com/win32com In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16045/com/win32com Modified Files: __init__.py universal.py Log Message: various py3k compatible syntax modernizations merged from py3k branch; unnecessary 'L' suffixes, raise exceptions as objects, types module, etc Index: universal.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/universal.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** universal.py 8 Jun 2005 05:19:03 -0000 1.13 --- universal.py 2 Oct 2008 12:09:53 -0000 1.14 *************** *** 35,39 **** # impl looks correct.. if type_info is None: ! raise ValueError, "The interface '%s' can not be located" % (name,) # If we got back a Dispatch interface, convert to the real interface. attr = type_info.GetTypeAttr() --- 35,39 ---- # impl looks correct.. if type_info is None: ! raise ValueError("The interface '%s' can not be located" % (name,)) # If we got back a Dispatch interface, convert to the real interface. attr = type_info.GetTypeAttr() *************** *** 51,60 **** # Cool - can used cached info. if not interface_names: ! interface_names = mod.VTablesToClassMap.values() for name in interface_names: try: iid = mod.NamesToIIDMap[name] except KeyError: ! raise ValueError, "Interface '%s' does not exist in this cached typelib" % (name,) # print "Processing interface", name sub_mod = gencache.GetModuleForCLSID(iid) --- 51,60 ---- # Cool - can used cached info. if not interface_names: ! interface_names = list(mod.VTablesToClassMap.values()) for name in interface_names: try: iid = mod.NamesToIIDMap[name] except KeyError: ! raise ValueError("Interface '%s' does not exist in this cached typelib" % (name,)) # print "Processing interface", name sub_mod = gencache.GetModuleForCLSID(iid) *************** *** 62,66 **** method_defs = getattr(sub_mod, name + "_vtables_", None) if is_dispatch is None or method_defs is None: ! raise ValueError, "Interface '%s' is IDispatch only" % (name,) # And create the univgw defn --- 62,66 ---- method_defs = getattr(sub_mod, name + "_vtables_", None) if is_dispatch is None or method_defs is None: ! raise ValueError("Interface '%s' is IDispatch only" % (name,)) # And create the univgw defn *************** *** 162,166 **** return self._iid def vtbl_argsizes(self): ! return map(lambda m: m.cbArgs, self._methods) def dispatch(self, ob, index, argPtr, ReadFromInTuple=_univgw.ReadFromInTuple, --- 162,166 ---- return self._iid def vtbl_argsizes(self): ! return [m.cbArgs for m in self._methods] def dispatch(self, ob, index, argPtr, ReadFromInTuple=_univgw.ReadFromInTuple, *************** *** 178,182 **** # None is an allowed return value stating that # the code doesn't want to touch any output arguments. ! if type(retVal) == types.TupleType: # Like pythoncom, we special case a tuple. # However, if they want to return a specific HRESULT, # then they have to return all of the out arguments --- 178,182 ---- # None is an allowed return value stating that # the code doesn't want to touch any output arguments. ! if type(retVal) == tuple: # Like pythoncom, we special case a tuple. # However, if they want to return a specific HRESULT, # then they have to return all of the out arguments *************** *** 186,190 **** retVal = retVal[1:] else: ! raise TypeError, "Expected %s return values, got: %s" % (len(meth._gw_out_args) + 1, len(retVal)) else: retVal = [retVal] --- 186,190 ---- retVal = retVal[1:] else: ! raise TypeError("Expected %s return values, got: %s" % (len(meth._gw_out_args) + 1, len(retVal))) else: retVal = [retVal] Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/__init__.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** __init__.py 20 Jan 2004 01:55:42 -0000 1.10 --- __init__.py 2 Oct 2008 12:09:53 -0000 1.11 *************** *** 105,115 **** # we must have a __gen_path__, but may not have a gen_py module - # set that up. ! if not sys.modules.has_key("win32com.gen_py"): # Create a "win32com.gen_py", but with a custom __path__ ! import new ! gen_py = new.module("win32com.gen_py") gen_py.__path__ = [ __gen_path__ ] sys.modules[gen_py.__name__]=gen_py ! del new gen_py = sys.modules["win32com.gen_py"] --- 105,115 ---- # we must have a __gen_path__, but may not have a gen_py module - # set that up. ! if "win32com.gen_py" not in sys.modules: # Create a "win32com.gen_py", but with a custom __path__ ! import imp ! gen_py = imp.new_module("win32com.gen_py") gen_py.__path__ = [ __gen_path__ ] sys.modules[gen_py.__name__]=gen_py ! del imp gen_py = sys.modules["win32com.gen_py"] |
From: Mark H. <mha...@us...> - 2008-10-02 12:09:59
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16045/com/win32comext/mapi Modified Files: mapiutil.py Log Message: various py3k compatible syntax modernizations merged from py3k branch; unnecessary 'L' suffixes, raise exceptions as objects, types module, etc Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mapiutil.py 20 Jan 2004 01:24:08 -0000 1.5 --- mapiutil.py 2 Oct 2008 12:09:53 -0000 1.6 *************** *** 1,12 **** # General utilities for MAPI and MAPI objects. ! from types import TupleType, ListType, IntType, StringType from pywintypes import UnicodeType, TimeType import pythoncom import mapi, mapitags - # Pre 2.2.1 compat. - try: True, False - except NameError: True = 1==1; False = 1==0 - prTable = {} def GetPropTagName(pt): --- 1,12 ---- # General utilities for MAPI and MAPI objects. ! # We used to use these old names from the 'types' module... ! TupleType=tuple ! ListType=list ! IntType=int ! StringType=str from pywintypes import UnicodeType, TimeType import pythoncom import mapi, mapitags prTable = {} def GetPropTagName(pt): |
From: Mark H. <mha...@us...> - 2008-10-02 11:41:25
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14550/Pythonwin/pywin/debugger Modified Files: configui.py Log Message: merge rest of py3k changes. Index: configui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/configui.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configui.py 2 Oct 2008 11:16:53 -0000 1.2 --- configui.py 2 Oct 2008 11:41:15 -0000 1.3 *************** *** 18,23 **** self.UpdateData() dirty = 0 ! for key, val in self.items(): ! if self.options.has_key(key): if self.options[key] != val: self.options[key] = val --- 18,23 ---- self.UpdateData() dirty = 0 ! for key, val in list(self.items()): ! if key in self.options: if self.options[key] != val: self.options[key] = val |
From: Mark H. <mha...@us...> - 2008-10-02 11:39:05
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14408/Pythonwin/pywin/debugger Modified Files: Tag: py3k configui.py Log Message: oops - correct merge - re-add py3k friendly changes. Index: configui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/configui.py,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.3 diff -C2 -d -r1.1.4.2 -r1.1.4.3 *** configui.py 2 Oct 2008 11:36:43 -0000 1.1.4.2 --- configui.py 2 Oct 2008 11:38:54 -0000 1.1.4.3 *************** *** 18,23 **** self.UpdateData() dirty = 0 ! for key, val in self.items(): ! if self.options.has_key(key): if self.options[key] != val: self.options[key] = val --- 18,23 ---- self.UpdateData() dirty = 0 ! for key, val in list(self.items()): ! if key in self.options: if self.options[key] != val: self.options[key] = val |
From: Mark H. <mha...@us...> - 2008-10-02 11:36:52
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14305/Pythonwin/pywin/debugger Modified Files: Tag: py3k configui.py Log Message: remove 'import *' Index: configui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/configui.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 *** configui.py 29 Aug 2008 06:16:41 -0000 1.1.4.1 --- configui.py 2 Oct 2008 11:36:43 -0000 1.1.4.2 *************** *** 1,4 **** ! from .dbgcon import * from pywin.mfc import dialog class DebuggerOptionsPropPage(dialog.PropertyPage): --- 1,5 ---- ! import dbgcon from pywin.mfc import dialog + import win32ui class DebuggerOptionsPropPage(dialog.PropertyPage): *************** *** 7,15 **** def OnInitDialog(self): ! options = self.options = LoadDebuggerOptions() ! self.AddDDX(win32ui.IDC_CHECK1, OPT_HIDE) ! self[OPT_STOP_EXCEPTIONS] = options[OPT_STOP_EXCEPTIONS] ! self.AddDDX(win32ui.IDC_CHECK2, OPT_STOP_EXCEPTIONS) ! self[OPT_HIDE] = options[OPT_HIDE] return dialog.PropertyPage.OnInitDialog(self) --- 8,16 ---- def OnInitDialog(self): ! options = self.options = dbgcon.LoadDebuggerOptions() ! self.AddDDX(win32ui.IDC_CHECK1, dbgcon.OPT_HIDE) ! self[dbgcon.OPT_STOP_EXCEPTIONS] = options[dbgcon.OPT_STOP_EXCEPTIONS] ! self.AddDDX(win32ui.IDC_CHECK2, dbgcon.OPT_STOP_EXCEPTIONS) ! self[dbgcon.OPT_HIDE] = options[dbgcon.OPT_HIDE] return dialog.PropertyPage.OnInitDialog(self) *************** *** 17,27 **** self.UpdateData() dirty = 0 ! for key, val in list(self.items()): ! if key in self.options: if self.options[key] != val: self.options[key] = val dirty = 1 if dirty: ! SaveDebuggerOptions(self.options) # If there is a debugger open, then set its options. import pywin.debugger --- 18,28 ---- self.UpdateData() dirty = 0 ! for key, val in self.items(): ! if self.options.has_key(key): if self.options[key] != val: self.options[key] = val dirty = 1 if dirty: ! dbgcon.SaveDebuggerOptions(self.options) # If there is a debugger open, then set its options. import pywin.debugger |
From: Mark H. <mha...@us...> - 2008-10-02 11:19:22
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13722/com/win32com/test Modified Files: Tag: py3k testGatewayAddresses.py Log Message: remove extended character from comment. Index: testGatewayAddresses.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGatewayAddresses.py,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** testGatewayAddresses.py 18 Nov 2002 11:20:06 -0000 1.2 --- testGatewayAddresses.py 2 Oct 2008 11:19:09 -0000 1.2.4.1 *************** *** 23,27 **** # 3) reflexive: if you QI against A for B, the new pointer must succeed # for a QI for A ! # 4) transitive: if you QI for B, then QI that for C, then QIing A for C # must succeed # --- 23,27 ---- # 3) reflexive: if you QI against A for B, the new pointer must succeed # for a QI for A ! # 4) transitive: if you QI for B, then QI that for C, then QI'ing A for C # must succeed # |
From: Mark H. <mha...@us...> - 2008-10-02 11:18:41
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13687/com/win32com/test Modified Files: testGatewayAddresses.py Log Message: remove extended character from comment. Index: testGatewayAddresses.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testGatewayAddresses.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testGatewayAddresses.py 18 Nov 2002 11:20:06 -0000 1.2 --- testGatewayAddresses.py 2 Oct 2008 11:18:28 -0000 1.3 *************** *** 23,27 **** # 3) reflexive: if you QI against A for B, the new pointer must succeed # for a QI for A ! # 4) transitive: if you QI for B, then QI that for C, then QIing A for C # must succeed # --- 23,27 ---- # 3) reflexive: if you QI against A for B, the new pointer must succeed # for a QI for A ! # 4) transitive: if you QI for B, then QI that for C, then QI'ing A for C # must succeed # |
From: Mark H. <mha...@us...> - 2008-10-02 11:17:01
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13573/Pythonwin/pywin/debugger Modified Files: configui.py Log Message: merge from py3k branch - remove 'import *' Index: configui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/configui.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** configui.py 1 Sep 1999 23:33:41 -0000 1.1 --- configui.py 2 Oct 2008 11:16:53 -0000 1.2 *************** *** 1,4 **** ! from dbgcon import * from pywin.mfc import dialog class DebuggerOptionsPropPage(dialog.PropertyPage): --- 1,5 ---- ! import dbgcon from pywin.mfc import dialog + import win32ui class DebuggerOptionsPropPage(dialog.PropertyPage): *************** *** 7,15 **** def OnInitDialog(self): ! options = self.options = LoadDebuggerOptions() ! self.AddDDX(win32ui.IDC_CHECK1, OPT_HIDE) ! self[OPT_STOP_EXCEPTIONS] = options[OPT_STOP_EXCEPTIONS] ! self.AddDDX(win32ui.IDC_CHECK2, OPT_STOP_EXCEPTIONS) ! self[OPT_HIDE] = options[OPT_HIDE] return dialog.PropertyPage.OnInitDialog(self) --- 8,16 ---- def OnInitDialog(self): ! options = self.options = dbgcon.LoadDebuggerOptions() ! self.AddDDX(win32ui.IDC_CHECK1, dbgcon.OPT_HIDE) ! self[dbgcon.OPT_STOP_EXCEPTIONS] = options[dbgcon.OPT_STOP_EXCEPTIONS] ! self.AddDDX(win32ui.IDC_CHECK2, dbgcon.OPT_STOP_EXCEPTIONS) ! self[dbgcon.OPT_HIDE] = options[dbgcon.OPT_HIDE] return dialog.PropertyPage.OnInitDialog(self) *************** *** 23,27 **** dirty = 1 if dirty: ! SaveDebuggerOptions(self.options) # If there is a debugger open, then set its options. import pywin.debugger --- 24,28 ---- dirty = 1 if dirty: ! dbgcon.SaveDebuggerOptions(self.options) # If there is a debugger open, then set its options. import pywin.debugger |
From: Mark H. <mha...@us...> - 2008-10-02 11:13:37
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13438/Pythonwin/pywin/Demos Modified Files: splittst.py threadedgui.py Log Message: modernize syntax: // int division Index: threadedgui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/threadedgui.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** threadedgui.py 6 May 2000 08:29:58 -0000 1.3 --- threadedgui.py 2 Oct 2008 11:13:28 -0000 1.4 *************** *** 66,70 **** self.width = right - left self.height = bottom - top ! x, y = self.width / 2, self.height / 2 dc.TextOut (x, y, self.text[:self.index]) self.EndPaint(paintStruct) --- 66,70 ---- self.width = right - left self.height = bottom - top ! x, y = self.width // 2, self.height // 2 dc.TextOut (x, y, self.text[:self.index]) self.EndPaint(paintStruct) *************** *** 96,99 **** --- 96,100 ---- self._obj_ = win32ui.CreateMDIChild() self._obj_.AttachObject(self) + self._obj_.CreateWindow(None, title, style, rect, parent) rect = self.GetClientRect() *************** *** 111,114 **** --- 112,116 ---- rect = self.parentWindow.GetClientRect() rect = (0,0,rect[2]-rect[0], rect[3]-rect[1]) + self.child = FontWindow() self.child.Create("FontDemo", win32con.WS_CHILD | win32con.WS_VISIBLE, rect, self.parentWindow) *************** *** 150,154 **** def ThreadedDemo(): rect = win32ui.GetMainFrame().GetMDIClient().GetClientRect() ! rect = rect[0], rect[3]*3/4, rect[2]/4, rect[3] incr = rect[2] for i in range(4): --- 152,156 ---- def ThreadedDemo(): rect = win32ui.GetMainFrame().GetMDIClient().GetClientRect() ! rect = rect[0], int(rect[3]*3/4), int(rect[2]/4), rect[3] incr = rect[2] for i in range(4): Index: splittst.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/splittst.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** splittst.py 11 Mar 2000 00:57:08 -0000 1.2 --- splittst.py 2 Oct 2008 11:13:28 -0000 1.3 *************** *** 18,23 **** frame_rect = self.GetWindowRect() size = ((frame_rect[2] - frame_rect[0]), ! (frame_rect[3] - frame_rect[1])/2) ! sub_size = (size[0]/2, size[1]) splitter.CreateStatic (self, 2, 1) self.v1 = win32ui.CreateEditView(doc) --- 18,23 ---- frame_rect = self.GetWindowRect() size = ((frame_rect[2] - frame_rect[0]), ! (frame_rect[3] - frame_rect[1])//2) ! sub_size = (size[0]//2, size[1]) splitter.CreateStatic (self, 2, 1) self.v1 = win32ui.CreateEditView(doc) |
From: Mark H. <mha...@us...> - 2008-10-02 10:16:20
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10812 Modified Files: CHANGES.txt Log Message: Note about MsgWaitForMultipleObjectsEx fix. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CHANGES.txt 1 Oct 2008 14:36:22 -0000 1.28 --- CHANGES.txt 2 Oct 2008 10:16:11 -0000 1.29 *************** *** 9,12 **** --- 9,15 ---- ---------------- + * MsgWaitForMultipleObjectsEx() would crash in all cases. Fix from + Ziga Seilnacht via [2141368]. + * pywintypes.error and com_error get support for attributes as well as indexing (ie, exc.winerror can now be used in place of exc[0].) |
From: Mark H. <mha...@us...> - 2008-10-02 01:31:40
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14129/test Modified Files: test_win32event.py Log Message: Fix for [ 2141368 ] win32event.MsgWaitForMultipleObjectsEx() segfaults from Ziga Seilnacht. Index: test_win32event.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32event.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_win32event.py 25 Jan 2005 07:53:35 -0000 1.1 --- test_win32event.py 2 Oct 2008 01:31:28 -0000 1.2 *************** *** 21,24 **** --- 21,47 ---- self.failUnlessEqual(rc, win32event.WAIT_TIMEOUT) + class TestWaitFunctions(unittest.TestCase): + def testMsgWaitForMultipleObjects(self): + # this function used to segfault when called with an empty list + res = win32event.MsgWaitForMultipleObjects([], 0, 0, 0) + self.assertEquals(res, win32event.WAIT_TIMEOUT) + + def testMsgWaitForMultipleObjects2(self): + # test with non-empty list + event = win32event.CreateEvent(None, 0, 0, None) + res = win32event.MsgWaitForMultipleObjects([event], 0, 0, 0) + self.assertEquals(res, win32event.WAIT_TIMEOUT) + + def testMsgWaitForMultipleObjectsEx(self): + # this function used to segfault when called with an empty list + res = win32event.MsgWaitForMultipleObjectsEx([], 0, 0, 0) + self.assertEquals(res, win32event.WAIT_TIMEOUT) + + def testMsgWaitForMultipleObjectsEx2(self): + # test with non-empty list + event = win32event.CreateEvent(None, 0, 0, None) + res = win32event.MsgWaitForMultipleObjectsEx([event], 0, 0, 0) + self.assertEquals(res, win32event.WAIT_TIMEOUT) + if __name__=='__main__': unittest.main() |
From: Mark H. <mha...@us...> - 2008-10-02 01:31:36
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14129/src Modified Files: win32event.i Log Message: Fix for [ 2141368 ] win32event.MsgWaitForMultipleObjectsEx() segfaults from Ziga Seilnacht. Index: win32event.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32event.i,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** win32event.i 30 Jun 2008 12:56:47 -0000 1.9 --- win32event.i 2 Oct 2008 01:31:28 -0000 1.10 *************** *** 219,223 **** %name(MsgWaitForMultipleObjectsEx) PyObject *MyMsgWaitForMultipleObjectsEx( PyObject *obHandleList, // @pyparm [<o PyHANDLE>, ...]|handleList||A sequence of handles to wait on. - BOOL fWaitAll, // @pyparm int|fWaitAll||wait for all or wait for one DWORD dwMilliseconds, // @pyparm int|milliseconds||time-out interval in milliseconds DWORD dwWakeMask, // @pyparm int|wakeMask||type of input events to wait for --- 219,222 ---- *************** *** 228,232 **** static PyObject * MyMsgWaitForMultipleObjectsEx( PyObject *handleList, - BOOL fWaitAll, // wait for all or wait for one DWORD dwMilliseconds, // time-out interval in milliseconds DWORD dwWakeMask, --- 227,230 ---- *************** *** 241,256 **** // Do a LoadLibrary, as the Ex version does not exist on NT3.x, Win95 ! // @comm This method does not exist on NT3.5x or Win95. If there ! // is an attempt to use it on these platforms, a COM error with ! // E_NOTIMPL will be raised. ! HMODULE hMod = GetModuleHandle("user32.dll"); ! if (hMod==0) return PyWin_SetBasicCOMError(E_HANDLE); ! FARPROC fp = GetProcAddress(hMod, "MsgWaitForMultipleObjectsEx"); ! if (fp==NULL) return PyWin_SetBasicCOMError(E_NOTIMPL); ! ! DWORD (*mypfn)(DWORD, LPHANDLE, DWORD, DWORD, DWORD); ! mypfn = (DWORD (*)(DWORD, LPHANDLE, DWORD, DWORD, DWORD))fp; Py_BEGIN_ALLOW_THREADS ! rc = (*mypfn)(numItems, pItems, dwMilliseconds, dwWakeMask, dwFlags); Py_END_ALLOW_THREADS PyObject *obrc; --- 239,246 ---- // Do a LoadLibrary, as the Ex version does not exist on NT3.x, Win95 ! // @comm This method will no longer raise a COM E_NOTIMPL exception ! // as it is no longer dynamically loaded. Py_BEGIN_ALLOW_THREADS ! rc = MsgWaitForMultipleObjectsEx(numItems, pItems, dwMilliseconds, dwWakeMask, dwFlags); Py_END_ALLOW_THREADS PyObject *obrc; |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:10
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/Demos Modified Files: objdoc.py Log Message: Move to 'new style' exception raising. Index: objdoc.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/objdoc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** objdoc.py 1 Sep 1999 23:33:35 -0000 1.1 --- objdoc.py 1 Oct 2008 14:44:52 -0000 1.2 *************** *** 32,36 **** self.object = object def OnOpenDocument (self, name): ! raise error, "Should not be called if template strings set up correctly" return 0 --- 32,36 ---- self.object = object def OnOpenDocument (self, name): ! raise Runtime("Should not be called if template strings set up correctly") return 0 *************** *** 47,49 **** import demoutils if demoutils.NeedGoodGUI(): ! demo() \ No newline at end of file --- 47,49 ---- import demoutils if demoutils.NeedGoodGUI(): ! demo() |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/adodbapi/tests In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/adodbapi/tests Modified Files: adodbapitest.py adodbapitestconfig.py dbapi20.py Log Message: Move to 'new style' exception raising. Index: adodbapitest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/adodbapitest.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** adodbapitest.py 5 Sep 2008 18:49:48 -0000 1.4 --- adodbapitest.py 1 Oct 2008 14:44:53 -0000 1.5 *************** *** 53,57 **** def getConnection(self): ! raise "This method must be overriden by a subclass" def getCursor(self): --- 53,57 ---- def getConnection(self): ! raise Exception("This method must be overriden by a subclass") def getCursor(self): *************** *** 189,193 **** assert descTuple[1] == adodbapi.ROWID, 'was "%s"'%descTuple[1] else: ! raise "DBAPIDataTypeString not provided" #Test data binding --- 189,193 ---- assert descTuple[1] == adodbapi.ROWID, 'was "%s"'%descTuple[1] else: ! raise Exception("DBAPIDataTypeString not provided") #Test data binding Index: dbapi20.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/dbapi20.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dbapi20.py 4 Jan 2008 18:49:10 -0000 1.1.1.1 --- dbapi20.py 1 Oct 2008 14:44:53 -0000 1.2 *************** *** 20,23 **** --- 20,26 ---- # $Log$ + # Revision 1.2 2008/10/01 14:44:53 mhammond + # Move to 'new style' exception raising. + # # Revision 1.1.1.1 2008/01/04 18:49:10 kf7xm # Import of the adodbapi package into pywin32. *************** *** 708,712 **** number of rows in booze then "name from booze" ''' ! raise NotImplementedError,'Helper not implemented' #sql=""" # create procedure deleteme as --- 711,715 ---- number of rows in booze then "name from booze" ''' ! raise NotImplementedError('Helper not implemented') #sql=""" # create procedure deleteme as *************** *** 720,724 **** def help_nextset_tearDown(self,cur): 'If cleaning up is needed after nextSetTest' ! raise NotImplementedError,'Helper not implemented' #cur.execute("drop procedure deleteme") --- 723,727 ---- def help_nextset_tearDown(self,cur): 'If cleaning up is needed after nextSetTest' ! raise NotImplementedError('Helper not implemented') #cur.execute("drop procedure deleteme") *************** *** 753,757 **** def test_nextset(self): ! raise NotImplementedError,'Drivers need to override this test' def test_arraysize(self): --- 756,760 ---- def test_nextset(self): ! raise NotImplementedError('Drivers need to override this test') def test_arraysize(self): *************** *** 788,792 **** def test_setoutputsize(self): # Real test for setoutputsize is driver dependant ! raise NotImplementedError,'Driver need to override this test' def test_None(self): --- 791,795 ---- def test_setoutputsize(self): # Real test for setoutputsize is driver dependant ! raise NotImplementedError('Driver need to override this test') def test_None(self): Index: adodbapitestconfig.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/adodbapitestconfig.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** adodbapitestconfig.py 29 Aug 2008 14:31:19 -0000 1.3 --- adodbapitestconfig.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 55,59 **** pass else: ! raise RuntimeError, "Can't find a DB engine" print ' ...Creating ACCESS db at',_accessdatasource if win32: --- 55,59 ---- pass else: ! raise RuntimeError("Can't find a DB engine") print ' ...Creating ACCESS db at',_accessdatasource if win32: |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/mfc Modified Files: dialog.py object.py Log Message: Move to 'new style' exception raising. Index: object.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/object.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** object.py 10 Jan 2006 04:37:14 -0000 1.3 --- object.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 21,29 **** # we dont want this exception if attr[0]!= '_' and attr[-1] != '_': ! raise win32ui.error, "The MFC object has died." except KeyError: # No _obj_ at all - dont report MFC object died when there isnt one! pass ! raise AttributeError, attr def OnAttachedObjectDeath(self): --- 21,29 ---- # we dont want this exception if attr[0]!= '_' and attr[-1] != '_': ! raise win32ui.error("The MFC object has died.") except KeyError: # No _obj_ at all - dont report MFC object died when there isnt one! pass ! raise AttributeError(attr) def OnAttachedObjectDeath(self): Index: dialog.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/dialog.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dialog.py 27 Nov 1999 07:57:38 -0000 1.3 --- dialog.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 19,23 **** dllid.GetFileName() except AttributeError: ! raise TypeError, "DLL parameter must be None, a filename or a dll object" return dllid --- 19,23 ---- dllid.GetFileName() except AttributeError: ! raise TypeError("DLL parameter must be None, a filename or a dll object") return dllid *************** *** 83,87 **** self.dll=dllFromDll(dllid) if type(dlgID)==type([]): # a template ! raise TypeError, "dlgID parameter must be an integer resource ID" dlg=win32ui.CreatePrintDialog(dlgID, printSetupOnly, flags, parent, --- 83,87 ---- self.dll=dllFromDll(dllid) if type(dlgID)==type([]): # a template ! raise TypeError("dlgID parameter must be an integer resource ID") dlg=win32ui.CreatePrintDialog(dlgID, printSetupOnly, flags, parent, |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/win32/Lib Modified Files: regcheck.py regutil.py Log Message: Move to 'new style' exception raising. Index: regutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regutil.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** regutil.py 8 Jan 2002 05:41:13 -0000 1.3 --- regutil.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 38,42 **** typeId = win32con.REG_DWORD else: ! raise TypeError, "Value must be string or integer - was passed " + str(value) win32api.RegSetValue(rootkey, subKey, typeId ,value) --- 38,42 ---- typeId = win32con.REG_DWORD else: ! raise TypeError("Value must be string or integer - was passed " + str(value)) win32api.RegSetValue(rootkey, subKey, typeId ,value) *************** *** 73,77 **** # Note - Dont work on win32s (but we dont care anymore!) if exeAppPath: ! raise error, "Do not support exeAppPath argument currently" if exeAlias is None: exeAlias = os.path.basename(exeFullPath) --- 73,77 ---- # Note - Dont work on win32s (but we dont care anymore!) if exeAppPath: ! raise error("Do not support exeAppPath argument currently") if exeAlias is None: exeAlias = os.path.basename(exeFullPath) *************** *** 91,95 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, desc) return --- 91,95 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, desc) return *************** *** 110,114 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, desc) return --- 110,114 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, desc) return *************** *** 123,127 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, details) return None --- 123,127 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, details) return None *************** *** 155,159 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, desc) def GetRegisteredHelpFile(helpDesc): --- 155,159 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, desc) def GetRegisteredHelpFile(helpDesc): *************** *** 185,189 **** if bCheckFile: os.stat(fullHelpFile) except os.error: ! raise ValueError, "Help file does not exist" # Now register with Python itself. win32api.RegSetValue(GetRootKey(), --- 185,189 ---- if bCheckFile: os.stat(fullHelpFile) except os.error: ! raise ValueError("Help file does not exist") # Now register with Python itself. win32api.RegSetValue(GetRootKey(), *************** *** 203,207 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, desc) finally: win32api.RegCloseKey(key) --- 203,207 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, desc) finally: win32api.RegCloseKey(key) *************** *** 215,219 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, desc) def RegisterCoreDLL(coredllName = None): --- 215,219 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, desc) def RegisterCoreDLL(coredllName = None): Index: regcheck.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regcheck.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** regcheck.py 19 May 2008 13:30:38 -0000 1.6 --- regcheck.py 1 Oct 2008 14:44:53 -0000 1.7 *************** *** 70,74 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, details) return --- 70,74 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, details) return *************** *** 90,94 **** import winerror if code!=winerror.ERROR_NO_MORE_ITEMS: ! raise win32api.error, (code, fn, desc) break finally: --- 90,94 ---- import winerror if code!=winerror.ERROR_NO_MORE_ITEMS: ! raise win32api.error(code, fn, desc) break finally: *************** *** 104,108 **** import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error, (code, fn, details) return --- 104,108 ---- import winerror if code!=winerror.ERROR_FILE_NOT_FOUND: ! raise win32api.error(code, fn, details) return |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/win32/Demos Modified Files: timer_demo.py win32gui_menu.py win32netdemo.py win32rcparser_demo.py winprocess.py Log Message: Move to 'new style' exception raising. Index: winprocess.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/winprocess.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** winprocess.py 3 Feb 2003 00:30:29 -0000 1.2 --- winprocess.py 1 Oct 2008 14:44:53 -0000 1.3 *************** *** 164,168 **** if child.wait(mSec) != win32event.WAIT_OBJECT_0: child.kill() ! raise WindowsError, 'process timeout exceeded' return child.exitCode() --- 164,168 ---- if child.wait(mSec) != win32event.WAIT_OBJECT_0: child.kill() ! raise WindowsError('process timeout exceeded') return child.exitCode() Index: timer_demo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/timer_demo.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** timer_demo.py 3 Feb 2003 00:30:29 -0000 1.4 --- timer_demo.py 1 Oct 2008 14:44:53 -0000 1.5 *************** *** 59,67 **** # Message waiting. if win32gui.PumpWaitingMessages(): ! raise RuntimeError, "We got an unexpected WM_QUIT message!" else: # This wait timed-out. if time.time()-start_time > 30: ! raise RuntimeError, "We timed out waiting for the timers to expire!" if __name__=='__main__': --- 59,67 ---- # Message waiting. if win32gui.PumpWaitingMessages(): ! raise RuntimeError("We got an unexpected WM_QUIT message!") else: # This wait timed-out. if time.time()-start_time > 30: ! raise RuntimeError("We timed out waiting for the timers to expire!") if __name__=='__main__': Index: win32gui_menu.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_menu.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32gui_menu.py 25 Jul 2008 01:26:33 -0000 1.8 --- win32gui_menu.py 1 Oct 2008 14:44:53 -0000 1.9 *************** *** 233,237 **** state = GetMenuState(self.sub_menu, id, win32con.MF_BYCOMMAND) if state==-1: ! raise RuntimeError, "No item found" if state & win32con.MF_CHECKED: check_flags = win32con.MF_UNCHECKED --- 233,237 ---- state = GetMenuState(self.sub_menu, id, win32con.MF_BYCOMMAND) if state==-1: ! raise RuntimeError("No item found") if state & win32con.MF_CHECKED: check_flags = win32con.MF_UNCHECKED *************** *** 257,261 **** if fState & win32con.MF_CHECKED != check_flags: ! raise RuntimeError, "The new item didn't get the new checked state!" else: print "OnCommand for ID", id --- 257,261 ---- if fState & win32con.MF_CHECKED != check_flags: ! raise RuntimeError("The new item didn't get the new checked state!") else: print "OnCommand for ID", id Index: win32netdemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32netdemo.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32netdemo.py 3 Feb 2003 00:30:29 -0000 1.5 --- win32netdemo.py 1 Oct 2008 14:44:53 -0000 1.6 *************** *** 167,171 **** new = win32net.NetUserGetInfo(server, userName, 3)['usr_comment'] if str(new) != "Test comment": ! raise RuntimeError, "Could not read the same comment back - got %s" % new print "Changed the data for the user" finally: --- 167,171 ---- new = win32net.NetUserGetInfo(server, userName, 3)['usr_comment'] if str(new) != "Test comment": ! raise RuntimeError("Could not read the same comment back - got %s" % new) print "Changed the data for the user" finally: Index: win32rcparser_demo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32rcparser_demo.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32rcparser_demo.py 26 May 2004 08:54:29 -0000 1.2 --- win32rcparser_demo.py 1 Oct 2008 14:44:53 -0000 1.3 *************** *** 19,23 **** if not os.path.isfile(g_rcname): ! raise RuntimeError, "Can't locate test.rc (should be at '%s')" % (g_rcname,) class DemoWindow: --- 19,23 ---- if not os.path.isfile(g_rcname): ! raise RuntimeError("Can't locate test.rc (should be at '%s')" % (g_rcname,)) class DemoWindow: |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/win32wnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/win32/Demos/win32wnet Modified Files: testwnet.py Log Message: Move to 'new style' exception raising. Index: testwnet.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32wnet/testwnet.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testwnet.py 9 Feb 2001 07:25:57 -0000 1.2 --- testwnet.py 1 Oct 2008 14:44:53 -0000 1.3 *************** *** 68,72 **** print "Current global user is", `u` if u != win32wnet.WNetGetUser(None): ! raise RuntimeError, "Default value didnt seem to work!" TestGetUser() --- 68,72 ---- print "Current global user is", `u` if u != win32wnet.WNetGetUser(None): ! raise RuntimeError("Default value didnt seem to work!") TestGetUser() |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:09
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/security In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/win32/Demos/security Modified Files: security_enums.py Log Message: Move to 'new style' exception raising. Index: security_enums.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/security/security_enums.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** security_enums.py 2 Aug 2007 07:04:16 -0000 1.2 --- security_enums.py 1 Oct 2008 14:44:53 -0000 1.3 *************** *** 15,19 **** const_val=getattr(winnt, const_name) except AttributeError: ! raise AttributeError, 'Constant "%s" not found in win32security, ntsecuritycon, or winnt.' %const_name setattr(self, const_name, const_val) --- 15,19 ---- const_val=getattr(winnt, const_name) except AttributeError: ! raise AttributeError('Constant "%s" not found in win32security, ntsecuritycon, or winnt.' %const_name) setattr(self, const_name, const_val) *************** *** 23,27 **** if v==const_val: return k ! raise AttributeError, 'Value %s not found in enum' %const_val def lookup_flags(self, flags): --- 23,27 ---- if v==const_val: return k ! raise AttributeError('Value %s not found in enum' %const_val) def lookup_flags(self, flags): |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:08
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/scintilla Modified Files: find.py formatter.py Log Message: Move to 'new style' exception raising. Index: find.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/find.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** find.py 3 Sep 2008 03:02:02 -0000 1.11 --- find.py 1 Oct 2008 14:44:53 -0000 1.12 *************** *** 27,31 **** def __setattr__(self, attr, val): if not hasattr(self, attr): ! raise AttributeError, attr self.__dict__[attr]=val --- 27,31 ---- def __setattr__(self, attr, val): if not hasattr(self, attr): ! raise AttributeError(attr) self.__dict__[attr]=val Index: formatter.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/formatter.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** formatter.py 9 Aug 2008 16:47:07 -0000 1.14 --- formatter.py 1 Oct 2008 14:44:53 -0000 1.15 *************** *** 85,89 **** def HookFormatter(self, parent = None): ! raise NotImplementedError # Used by the IDLE extensions to quickly determine if a character is a string. --- 85,89 ---- def HookFormatter(self, parent = None): ! raise NotImplementedError() # Used by the IDLE extensions to quickly determine if a character is a string. *************** *** 107,111 **** def SetStyles(self): ! raise NotImplementedError def GetSampleText(self): --- 107,111 ---- def SetStyles(self): ! raise NotImplementedError() def GetSampleText(self): *************** *** 236,240 **** def ColorizeString(self, str, charStart, styleStart): ! raise RuntimeError, "You must override this method" def Colorize(self, start=0, end=-1): --- 236,240 ---- def ColorizeString(self, str, charStart, styleStart): ! raise RuntimeError("You must override this method") def Colorize(self, start=0, end=-1): |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:08
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/ocx In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/Demos/ocx Modified Files: webbrowser.py Log Message: Move to 'new style' exception raising. Index: webbrowser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/ocx/webbrowser.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** webbrowser.py 1 Sep 1999 23:33:40 -0000 1.1 --- webbrowser.py 1 Oct 2008 14:44:52 -0000 1.2 *************** *** 11,15 **** WebBrowserModule = gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1) if WebBrowserModule is None: ! raise ImportError, "IE4 does not appear to be installed." class MyWebBrowser(activex.Control, WebBrowserModule.WebBrowser): --- 11,15 ---- WebBrowserModule = gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1) if WebBrowserModule is None: ! raise ImportError("IE4 does not appear to be installed.") class MyWebBrowser(activex.Control, WebBrowserModule.WebBrowser): |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:05
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/com/win32com/client Modified Files: tlbrowse.py util.py Log Message: Move to 'new style' exception raising. Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/util.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** util.py 24 May 2007 13:00:03 -0000 1.3 --- util.py 1 Oct 2008 14:44:53 -0000 1.4 *************** *** 40,44 **** def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError, "Only integer indexes are supported for enumerators" # NOTE # In this context, self.index is users purely as a flag to say --- 40,44 ---- def __GetIndex(self, index): ! if type(index)!=type(0): raise TypeError("Only integer indexes are supported for enumerators") # NOTE # In this context, self.index is users purely as a flag to say *************** *** 54,58 **** if len(result): return self._make_retval_(result[0]) ! raise IndexError, "list index out of range" def Next(self, count=1): ret = self._oleobj_.Next(count) --- 54,58 ---- if len(result): return self._make_retval_(result[0]) ! raise IndexError("list index out of range") def Next(self, count=1): ret = self._oleobj_.Next(count) Index: tlbrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/tlbrowse.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tlbrowse.py 27 Oct 2002 10:15:48 -0000 1.4 --- tlbrowse.py 1 Oct 2008 14:44:53 -0000 1.5 *************** *** 7,11 **** from pywin.mfc import dialog ! error = "TypeLib browser internal error" FRAMEDLG_STD = win32con.WS_CAPTION | win32con.WS_SYSMENU --- 7,13 ---- from pywin.mfc import dialog ! class TLBrowserException(Exception): ! "TypeLib browser internal error" ! error = TLBrowserException FRAMEDLG_STD = win32con.WS_CAPTION | win32con.WS_SYSMENU *************** *** 193,197 **** return pos, 0 else: ! raise error, "The position is not valid" def CmdMemberListbox(self, id, code): --- 195,199 ---- return pos, 0 else: ! raise error("The position is not valid") def CmdMemberListbox(self, id, code): |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:05
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/framework Modified Files: stdin.py Log Message: Move to 'new style' exception raising. Index: stdin.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/stdin.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** stdin.py 9 Aug 2008 16:47:07 -0000 1.3 --- stdin.py 1 Oct 2008 14:44:52 -0000 1.4 *************** *** 159,163 **** test_input = test_input[end_of_line_pos + 1:] if len(result) == 0 or result[0] == '~': ! raise 'EOF' return result --- 159,163 ---- test_input = test_input[end_of_line_pos + 1:] if len(result) == 0 or result[0] == '~': ! raise EOFError() return result |
From: Mark H. <mha...@us...> - 2008-10-01 14:45:04
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21342/Pythonwin/pywin/idle Modified Files: AutoIndent.py Log Message: Move to 'new style' exception raising. Index: AutoIndent.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/AutoIndent.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AutoIndent.py 9 Aug 2008 16:47:07 -0000 1.3 --- AutoIndent.py 1 Oct 2008 14:44:52 -0000 1.4 *************** *** 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" % `key`) # If ispythonsource and guess are true, guess a good value for |