pywin32-checkins Mailing List for Python for Windows Extensions (Page 35)
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-12-19 02:16:43
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14211/win32com/test Modified Files: testPyComTest.py Log Message: use absolute imports so we work ok as a script in py3k Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** testPyComTest.py 4 Dec 2008 03:38:20 -0000 1.40 --- testPyComTest.py 19 Dec 2008 01:52:35 -0000 1.41 *************** *** 8,12 **** from win32com.client import constants import win32com ! from util import RegisterPythonServer importMsg = "**** PyCOMTest is not installed ***\n PyCOMTest is a Python test specific COM client and server.\n It is likely this server is not installed on this machine\n To install the server, you must get the win32com sources\n and build it using MS Visual C++" --- 8,12 ---- from win32com.client import constants import win32com ! from win32com.test.util import RegisterPythonServer importMsg = "**** PyCOMTest is not installed ***\n PyCOMTest is a Python test specific COM client and server.\n It is likely this server is not installed on this machine\n To install the server, you must get the win32com sources\n and build it using MS Visual C++" |
From: Mark H. <mha...@us...> - 2008-12-19 02:16:40
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14189/win32com/test Modified Files: testStreams.py Log Message: py3k-friendly bytes handling Index: testStreams.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testStreams.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testStreams.py 26 Nov 2008 08:52:32 -0000 1.7 --- testStreams.py 19 Dec 2008 01:52:15 -0000 1.8 *************** *** 10,14 **** _com_interfaces_ = [ pythoncom.IID_IPersistStreamInit ] def __init__(self): ! self.data = "abcdefg" self.dirty = 1 def GetClassID(self): --- 10,14 ---- _com_interfaces_ = [ pythoncom.IID_IPersistStreamInit ] def __init__(self): ! self.data = "abcdefg".encode("ascii") self.dirty = 1 def GetClassID(self): *************** *** 67,71 **** """ def Read(self, amount): ! return 'x'*(amount+1) class StreamTest(win32com.test.util.TestCase): --- 67,71 ---- """ def Read(self, amount): ! return 'x'.encode('ascii')*(amount+1) class StreamTest(win32com.test.util.TestCase): *************** *** 81,85 **** def testit(self): ! mydata = 'abcdefghijklmnopqrstuvwxyz' # First test the objects just as Python objects... --- 81,85 ---- def testit(self): ! mydata = 'abcdefghijklmnopqrstuvwxyz'.encode('ascii') # First test the objects just as Python objects... *************** *** 90,94 **** p.Save(s, 0) self.assertEqual(s.data, mydata) ! # Wrap the Python objects as COM objects, and make the calls as if # they were non-Python COM objects. --- 90,94 ---- p.Save(s, 0) self.assertEqual(s.data, mydata) ! # Wrap the Python objects as COM objects, and make the calls as if # they were non-Python COM objects. *************** *** 101,105 **** self._readWrite(mydata, s2, s2) ! self._readWrite("string with\0a NULL", s2, s2) # reset the stream s.Write(mydata) --- 101,105 ---- self._readWrite(mydata, s2, s2) ! self._readWrite("string with\0a NULL".encode('ascii'), s2, s2) # reset the stream s.Write(mydata) *************** *** 108,111 **** --- 108,112 ---- self.assertEqual(s.data, mydata) + def testerrors(self): # setup a test logger to capture tracebacks etc. records, old_log = win32com.test.util.setup_test_logger() |
From: Jason R. C. <ja...@us...> - 2008-12-17 20:31:58
|
Update of /cvsroot/pywin32/pywin32/isapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32005 Modified Files: install.py Log Message: Removed old_split_path. I had left it only so one could track the new behavior against the previous behavior. Index: install.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/install.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** install.py 17 Dec 2008 03:53:10 -0000 1.16 --- install.py 17 Dec 2008 20:31:51 -0000 1.17 *************** *** 197,234 **** return server.adsPath - def old_split_path(path): - slash = path.rfind("/") - if slash >= 0: - parent = path[:slash] - name = path[slash+1:] - else: - parent = "" - name = path - return parent, name - def split_path(path): """ ! Get the parent path and basename ! >>> old_split_path('/') == split_path('/') ! True ! >>> old_split_path('') == split_path('') ! True ! >>> old_split_path('foo') == split_path('foo') ! True ! >>> old_split_path('/foo') == split_path('/foo') ! True ! >>> old_split_path('/foo/bar') == split_path('/foo/bar') ! True ! >>> old_split_path('foo/bar') == split_path('foo/bar') ! False """ if not path.startswith('/'): path = '/' + path ! return tuple(path.rsplit('/', 1)) def ReallyCreateDirectory(iis_dir, name, params): --- 197,225 ---- return server.adsPath def split_path(path): """ ! Get the parent path and basename. ! >>> split_path('/') ! ['', ''] ! >>> split_path('') ! ['', ''] ! >>> split_path('foo') ! ['', 'foo'] ! >>> split_path('/foo') ! ['', 'foo'] ! >>> split_path('/foo/bar') ! ['/foo', 'bar'] ! ! >>> split_path('foo/bar') ! ['/foo', 'bar'] """ if not path.startswith('/'): path = '/' + path ! return path.rsplit('/', 1) def ReallyCreateDirectory(iis_dir, name, params): |
From: Mark H. <mha...@us...> - 2008-12-17 13:13:04
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10480/win32/src Modified Files: PyHANDLE.cpp PyWinObjects.h Log Message: PyHANDLE objects get rich-comparison support. Index: PyWinObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** PyWinObjects.h 11 Dec 2008 00:25:40 -0000 1.16 --- PyWinObjects.h 17 Dec 2008 13:12:56 -0000 1.17 *************** *** 140,143 **** --- 140,145 ---- /* Python support */ int compare(PyObject *ob); + PyObject *richcompare(PyObject *other, int op); + int print(FILE *fp, int flags); PyObject *asStr(void); *************** *** 147,150 **** --- 149,153 ---- static int printFunc(PyObject *ob, FILE *fp, int flags); static int compareFunc(PyObject *ob1, PyObject *ob2); + static PyObject *richcompareFunc(PyObject *ob, PyObject *other, int op); static int nonzeroFunc(PyObject *ob); static long hashFunc(PyObject *ob); Index: PyHANDLE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** PyHANDLE.cpp 11 Dec 2008 00:25:40 -0000 1.19 --- PyHANDLE.cpp 17 Dec 2008 13:12:56 -0000 1.20 *************** *** 184,188 **** 0, /* tp_traverse */ 0, /* tp_clear */ ! 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ --- 184,188 ---- 0, /* tp_traverse */ 0, /* tp_clear */ ! PyHANDLE::richcompareFunc, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ *************** *** 274,277 **** --- 274,297 ---- } + PyObject *PyHANDLE::richcompare(PyObject *other, int op) + { + BOOL e; + if (PyHANDLE_Check(other)) + e=compare((PyHANDLE *)other)==0; + else + e=FALSE; + PyObject *ret; + if (op==Py_EQ) + ret = e ? Py_True : Py_False; + else if (op==Py_NE) + ret = !e ? Py_True : Py_False; + else { + PyErr_SetString(PyExc_TypeError, "HANDLEs only compare equal or not equal"); + ret = NULL; + } + Py_XINCREF(ret); + return ret; + } + // @pymethod |PyHANDLE|__int__|Used when the handle as an integer is required. // @comm To get the underling win32 handle from a PyHANDLE object, use int(handleObject) *************** *** 307,310 **** --- 327,335 ---- } + PyObject *PyHANDLE::richcompareFunc(PyObject *ob, PyObject *other, int op) + { + return ((PyHANDLE *)ob)->richcompare(other, op); + } + // @pymethod int|PyHANDLE|__hash__|Used when the hash value of a HANDLE object is required long PyHANDLE::hashFunc(PyObject *ob) |
From: Mark H. <mha...@us...> - 2008-12-17 13:12:09
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10298/win32/src Modified Files: win32helpmodule.cpp Log Message: whitespace/indentation normalization from py3k branch Index: win32helpmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32helpmodule.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32helpmodule.cpp 11 Dec 2008 00:25:40 -0000 1.8 --- win32helpmodule.cpp 17 Dec 2008 13:11:57 -0000 1.9 *************** *** 142,183 **** PyTypeObject PyHH_AKLINKType = { ! PYWIN_OBJECT_HEAD ! "PyHH_AKLINK", /* tp_name */ ! sizeof(PyHH_AKLINK), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_AKLINK::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyObject_GenericGetAttr, /* tp_getattro */ ! PyHH_AKLINK::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_AKLINK structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_AKLINK::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 142,183 ---- PyTypeObject PyHH_AKLINKType = { ! PYWIN_OBJECT_HEAD ! "PyHH_AKLINK", /* tp_name */ ! sizeof(PyHH_AKLINK), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_AKLINK::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyObject_GenericGetAttr, /* tp_getattro */ ! PyHH_AKLINK::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_AKLINK structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_AKLINK::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 287,291 **** char *name=PYWIN_ATTR_CONVERT(obname); if (name==NULL) ! return -1; PyHH_AKLINK *pO = (PyHH_AKLINK *)self; --- 287,291 ---- char *name=PYWIN_ATTR_CONVERT(obname); if (name==NULL) ! return -1; PyHH_AKLINK *pO = (PyHH_AKLINK *)self; *************** *** 423,465 **** //Use this structure for full-text search. ! PyTypeObject PyHH_FTS_QUERYType = { ! PYWIN_OBJECT_HEAD ! "PyHH_FTS_QUERY", /* tp_name */ ! sizeof(PyHH_FTS_QUERY), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_FTS_QUERY::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_FTS_QUERY::getattro, /* tp_getattro */ ! PyHH_FTS_QUERY::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_FTS_QUERY struct", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_FTS_QUERY::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 423,465 ---- //Use this structure for full-text search. ! PyTypeObject PyHH_FTS_QUERYType = { ! PYWIN_OBJECT_HEAD ! "PyHH_FTS_QUERY", /* tp_name */ ! sizeof(PyHH_FTS_QUERY), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_FTS_QUERY::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_FTS_QUERY::getattro, /* tp_getattro */ ! PyHH_FTS_QUERY::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_FTS_QUERY struct", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_FTS_QUERY::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 528,532 **** Py_XDECREF(m_pszSearchQuery); } ! PyObject *PyHH_FTS_QUERY::getattro(PyObject *self, PyObject *obname) { --- 528,532 ---- Py_XDECREF(m_pszSearchQuery); } ! PyObject *PyHH_FTS_QUERY::getattro(PyObject *self, PyObject *obname) { *************** *** 534,548 **** if (name==NULL) return NULL; ! PyHH_FTS_QUERY *pO = (PyHH_FTS_QUERY *)self; ! ! if (strcmp("searchQuery", name)==0) { ! PyObject *rc = pO->m_pszSearchQuery ? pO->m_pszSearchQuery : Py_None; ! Py_INCREF(rc); ! return rc; ! } return PyObject_GenericGetAttr(self, obname); } ! int PyHH_FTS_QUERY::setattro(PyObject *self, PyObject *obname, PyObject *v) { --- 534,548 ---- if (name==NULL) return NULL; ! PyHH_FTS_QUERY *pO = (PyHH_FTS_QUERY *)self; ! ! if (strcmp("searchQuery", name)==0) { ! PyObject *rc = pO->m_pszSearchQuery ? pO->m_pszSearchQuery : Py_None; ! Py_INCREF(rc); ! return rc; ! } return PyObject_GenericGetAttr(self, obname); } ! int PyHH_FTS_QUERY::setattro(PyObject *self, PyObject *obname, PyObject *v) { *************** *** 590,594 **** return TRUE; } ! PyObject *PyWinObject_FromHH_FTS_QUERY(const HH_FTS_QUERY *pFTS_QUERY) { --- 590,594 ---- return TRUE; } ! PyObject *PyWinObject_FromHH_FTS_QUERY(const HH_FTS_QUERY *pFTS_QUERY) { *************** *** 663,704 **** PyTypeObject PyHH_POPUPType = { ! PYWIN_OBJECT_HEAD ! "PyHH_POPUP", /* tp_name */ ! sizeof(PyHH_POPUP), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_POPUP::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_POPUP::getattro, /* tp_getattro */ ! PyHH_POPUP::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_POPUP structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_POPUP::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 663,704 ---- PyTypeObject PyHH_POPUPType = { ! PYWIN_OBJECT_HEAD ! "PyHH_POPUP", /* tp_name */ ! sizeof(PyHH_POPUP), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_POPUP::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_POPUP::getattro, /* tp_getattro */ ! PyHH_POPUP::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_POPUP structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_POPUP::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 807,811 **** Py_XDECREF(m_pszFont); } ! PyObject *PyHH_POPUP::getattro(PyObject *self, PyObject *obname) { --- 807,811 ---- Py_XDECREF(m_pszFont); } ! PyObject *PyHH_POPUP::getattro(PyObject *self, PyObject *obname) { *************** *** 815,819 **** PyHH_POPUP *pO = (PyHH_POPUP *)self; ! if (strcmp("text", name)==0) { PyObject *rc = pO->m_pszText ? pO->m_pszText : Py_None; --- 815,819 ---- PyHH_POPUP *pO = (PyHH_POPUP *)self; ! if (strcmp("text", name)==0) { PyObject *rc = pO->m_pszText ? pO->m_pszText : Py_None; *************** *** 839,843 **** return PyObject_GenericGetAttr(self, obname); } ! int PyHH_POPUP::setattro(PyObject *self, PyObject *obname, PyObject *v) { --- 839,843 ---- return PyObject_GenericGetAttr(self, obname); } ! int PyHH_POPUP::setattro(PyObject *self, PyObject *obname, PyObject *v) { *************** *** 900,904 **** return PyObject_GenericSetAttr(self, obname, v); } ! /*static*/ void PyHH_POPUP::deallocFunc(PyObject *ob) { --- 900,904 ---- return PyObject_GenericSetAttr(self, obname, v); } ! /*static*/ void PyHH_POPUP::deallocFunc(PyObject *ob) { *************** *** 993,1034 **** PyTypeObject PyHH_WINTYPEType = { ! PYWIN_OBJECT_HEAD ! "PyHH_WINTYPE", /* tp_name */ ! sizeof(PyHH_WINTYPE), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_WINTYPE::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_WINTYPE::getattro, /* tp_getattro */ ! PyHH_WINTYPE::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_WINTYPE structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_WINTYPE::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 993,1034 ---- PyTypeObject PyHH_WINTYPEType = { ! PYWIN_OBJECT_HEAD ! "PyHH_WINTYPE", /* tp_name */ ! sizeof(PyHH_WINTYPE), /* tp_basicsize */ ! 0, /* tp_itemsize */ ! PyHH_WINTYPE::deallocFunc, /* tp_dealloc */ ! 0, /* tp_print */ ! 0, /* tp_getattr */ ! 0, /* tp_setattr */ ! 0, /* tp_compare */ ! 0, /* tp_repr */ ! 0, /* tp_as_number */ ! 0, /* tp_as_sequence */ ! 0, /* tp_as_mapping */ ! 0, /* tp_hash */ ! 0, /* tp_call */ ! 0, /* tp_str */ ! PyHH_WINTYPE::getattro, /* tp_getattro */ ! PyHH_WINTYPE::setattro, /* tp_setattro */ ! 0, /* tp_as_buffer */ ! 0, /* tp_flags */ ! "A Python object, representing an HH_WINTYPE structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHH_WINTYPE::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 1507,1527 **** 0, /* tp_flags */ "A Python object, representing an NMHDR structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyNMHDR::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 1507,1527 ---- 0, /* tp_flags */ "A Python object, representing an NMHDR structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyNMHDR::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 1683,1704 **** 0, /* tp_as_buffer */ 0, /* tp_flags */ ! "A Python object, representing an HHN_NOTIFY structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHHN_NOTIFY::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 1683,1704 ---- 0, /* tp_as_buffer */ 0, /* tp_flags */ ! "A Python object, representing an HHN_NOTIFY structure", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHHN_NOTIFY::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 1921,1941 **** 0, /* tp_flags */ "A Python object, representing an HHNTRACK structure.", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHHNTRACK::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; --- 1921,1941 ---- 0, /* tp_flags */ "A Python object, representing an HHNTRACK structure.", /* tp_doc */ ! 0, /* tp_traverse */ ! 0, /* tp_clear */ ! 0, /* tp_richcompare */ ! 0, /* tp_weaklistoffset */ ! 0, /* tp_iter */ ! 0, /* tp_iternext */ ! 0, /* tp_methods */ ! PyHHNTRACK::members, /* tp_members */ ! 0, /* tp_getset */ ! 0, /* tp_base */ ! 0, /* tp_dict */ ! 0, /* tp_descr_get */ ! 0, /* tp_descr_set */ ! 0, /* tp_dictoffset */ ! 0, /* tp_init */ ! 0, /* tp_alloc */ ! 0, /* tp_new */ }; *************** *** 2012,2017 **** return NULL; ! PyHHNTRACK *pO = (PyHHNTRACK *)self; ! if (strcmp("hdr", name)==0) { PyObject *rc = pO->m_hdr ? pO->m_hdr : Py_None; --- 2012,2016 ---- return NULL; ! PyHHNTRACK *pO = (PyHHNTRACK *)self; if (strcmp("hdr", name)==0) { PyObject *rc = pO->m_hdr ? pO->m_hdr : Py_None; *************** *** 2043,2047 **** if (name==NULL) return -1; ! PyHHNTRACK *pO = (PyHHNTRACK *)self; if (strcmp("hdr", name)==0) { --- 2042,2046 ---- if (name==NULL) return -1; ! PyHHNTRACK *pO = (PyHHNTRACK *)self; if (strcmp("hdr", name)==0) { |
From: Mark H. <mha...@us...> - 2008-12-17 13:09:57
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9910/com/win32comext/axdebug/src Modified Files: AXDebug.cpp Log Message: Move to PYWIN_MODULE_* macros from py3k branch Index: AXDebug.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AXDebug.cpp 8 Dec 2008 13:16:36 -0000 1.6 --- AXDebug.cpp 17 Dec 2008 13:09:45 -0000 1.7 *************** *** 280,284 **** }; ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) RETURN_ERROR; /* Module initialisation */ --- 280,284 ---- }; ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) PYWIN_MODULE_INIT_RETURN_ERROR; /* Module initialisation */ *************** *** 293,297 **** axdebug_Error = PyErr_NewException("axdebug.error", NULL, NULL); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! RETURN_ERROR; // AX-Debugging interface registration --- 293,297 ---- axdebug_Error = PyErr_NewException("axdebug.error", NULL, NULL); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! PYWIN_MODULE_INIT_RETURN_ERROR; // AX-Debugging interface registration |
Update of /cvsroot/pywin32/pywin32/com/win32comext/directsound/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9690/com/win32comext/directsound/src Modified Files: PyDSBCAPS.cpp PyDSBUFFERDESC.cpp PyDSCAPS.cpp PyDSCBCAPS.cpp PyDSCBUFFERDESC.cpp PyDSCCAPS.cpp Log Message: Move to PYWIN_OBJECT_HEAD and other trivial modernizations from py3k branch Index: PyDSBUFFERDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSBUFFERDESC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyDSBUFFERDESC.cpp 25 Mar 2005 01:52:11 -0000 1.3 --- PyDSBUFFERDESC.cpp 17 Dec 2008 13:08:25 -0000 1.4 *************** *** 48,53 **** PyTypeObject PyDSBUFFERDESCType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSBUFFERDESC", sizeof(PyDSBUFFERDESC), --- 48,52 ---- PyTypeObject PyDSBUFFERDESCType = { ! PYWIN_OBJECT_HEAD "PyDSBUFFERDESC", sizeof(PyDSBUFFERDESC), *************** *** 154,159 **** { PyDSBUFFERDESC *obself = (PyDSBUFFERDESC*)self; ! char *name=PyString_AsString(obname); ! if (name==NULL) return -1; --- 153,157 ---- { PyDSBUFFERDESC *obself = (PyDSBUFFERDESC*)self; ! char *name=PYWIN_ATTR_CONVERT(obname); if (name==NULL) return -1; Index: PyDSCCAPS.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCCAPS.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyDSCCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.2 --- PyDSCCAPS.cpp 17 Dec 2008 13:08:25 -0000 1.3 *************** *** 43,48 **** PyTypeObject PyDSCCAPSType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSCCAPSType", sizeof(PyDSCCAPSType), --- 43,47 ---- PyTypeObject PyDSCCAPSType = { ! PYWIN_OBJECT_HEAD "PyDSCCAPSType", sizeof(PyDSCCAPSType), Index: PyDSCAPS.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCAPS.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyDSCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.3 --- PyDSCAPS.cpp 17 Dec 2008 13:08:25 -0000 1.4 *************** *** 43,48 **** PyTypeObject PyDSCAPSType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSCAPSType", sizeof(PyDSCAPSType), --- 43,47 ---- PyTypeObject PyDSCAPSType = { ! PYWIN_OBJECT_HEAD "PyDSCAPSType", sizeof(PyDSCAPSType), Index: PyDSBCAPS.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSBCAPS.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyDSBCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.3 --- PyDSBCAPS.cpp 17 Dec 2008 13:08:25 -0000 1.4 *************** *** 43,48 **** PyTypeObject PyDSBCAPSType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSBCAPS", sizeof(PyDSBCAPS), --- 43,47 ---- PyTypeObject PyDSBCAPSType = { ! PYWIN_OBJECT_HEAD "PyDSBCAPS", sizeof(PyDSBCAPS), Index: PyDSCBCAPS.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCBCAPS.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyDSCBCAPS.cpp 25 Mar 2005 01:52:11 -0000 1.2 --- PyDSCBCAPS.cpp 17 Dec 2008 13:08:25 -0000 1.3 *************** *** 43,48 **** PyTypeObject PyDSCBCAPSType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSCBCAPSType", sizeof(PyDSCBCAPSType), --- 43,47 ---- PyTypeObject PyDSCBCAPSType = { ! PYWIN_OBJECT_HEAD "PyDSCBCAPSType", sizeof(PyDSCBCAPSType), Index: PyDSCBUFFERDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyDSCBUFFERDESC.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyDSCBUFFERDESC.cpp 25 Mar 2005 01:52:11 -0000 1.2 --- PyDSCBUFFERDESC.cpp 17 Dec 2008 13:08:25 -0000 1.3 *************** *** 48,53 **** PyTypeObject PyDSCBUFFERDESCType = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, "PyDSCBUFFERDESC", sizeof(PyDSCBUFFERDESC), --- 48,52 ---- PyTypeObject PyDSCBUFFERDESCType = { ! PYWIN_OBJECT_HEAD "PyDSCBUFFERDESC", sizeof(PyDSCBUFFERDESC), *************** *** 142,146 **** { PyDSCBUFFERDESC *obself = (PyDSCBUFFERDESC*)self; ! char *name=PyString_AsString(obname); if (name==NULL) --- 141,145 ---- { PyDSCBUFFERDESC *obself = (PyDSCBUFFERDESC*)self; ! char *name=PYWIN_ATTR_CONVERT(obname); if (name==NULL) |
From: Mark H. <mha...@us...> - 2008-12-17 13:06:25
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9344/win32/test Modified Files: test_win32file.py Log Message: trim whitespace; from py3k branch Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** test_win32file.py 11 Dec 2008 07:00:33 -0000 1.20 --- test_win32file.py 17 Dec 2008 13:06:19 -0000 1.21 *************** *** 66,70 **** # GetFileAttributesEx/GetFileAttributesExW tests. ! self.failUnlessEqual(win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName)) attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName) --- 66,70 ---- # GetFileAttributesEx/GetFileAttributesExW tests. ! self.failUnlessEqual(win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName)) attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName) |
From: Mark H. <mha...@us...> - 2008-12-17 13:05:44
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9190/win32/src Modified Files: win32inet_winhttp.cpp Log Message: Use _T() macros for string literals to help py3k Index: win32inet_winhttp.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32inet_winhttp.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32inet_winhttp.cpp 8 Dec 2008 12:37:51 -0000 1.3 --- win32inet_winhttp.cpp 17 Dec 2008 13:05:38 -0000 1.4 *************** *** 45,49 **** void init_win32inetstuff() { ! HMODULE hmod = LoadLibrary("Winhttp.dll"); if (!hmod) return; // nothing else to do! --- 45,49 ---- void init_win32inetstuff() { ! HMODULE hmod = LoadLibrary(_T("Winhttp.dll")); if (!hmod) return; // nothing else to do! |
From: Mark H. <mha...@us...> - 2008-12-17 13:05:06
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9027/win32/src Modified Files: win32job.i Log Message: let setup.py dictate UNICODE or not (which for win32job is true) Index: win32job.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32job.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32job.i 3 Jun 2007 14:53:07 -0000 1.4 --- win32job.i 17 Dec 2008 13:04:59 -0000 1.5 *************** *** 5,9 **** %{ - #define UNICODE #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x500 --- 5,8 ---- |
From: Mark H. <mha...@us...> - 2008-12-17 13:05:06
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9027 Modified Files: setup.py Log Message: let setup.py dictate UNICODE or not (which for win32job is true) Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** setup.py 24 Nov 2008 06:05:52 -0000 1.86 --- setup.py 17 Dec 2008 13:04:59 -0000 1.87 *************** *** 1299,1303 **** ("win32evtlog", "advapi32 oleaut32", False), # win32gui handled below ! ("win32job", "user32", False, 0x0500, 'win32/src/win32job.i win32/src/win32jobmodule.cpp'), ("win32lz", "lz32", False), ("win32net", "netapi32 advapi32", True, None, """ --- 1299,1303 ---- ("win32evtlog", "advapi32 oleaut32", False), # win32gui handled below ! ("win32job", "user32", True, 0x0500, 'win32/src/win32job.i win32/src/win32jobmodule.cpp'), ("win32lz", "lz32", False), ("win32net", "netapi32 advapi32", True, None, """ |
From: Mark H. <mha...@us...> - 2008-12-17 12:57:50
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7375/com/win32com/servers Modified Files: dictionary.py Log Message: fix silly error I introduced in py3k merging Index: dictionary.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/dictionary.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dictionary.py 4 Dec 2008 05:23:15 -0000 1.6 --- dictionary.py 17 Dec 2008 12:57:44 -0000 1.7 *************** *** 74,78 **** key = args[0] ! if type(exp) not in [str, unicode]: ### the nArgErr thing should be 0-based, not reversed... sigh raise COMException(desc="Key must be a string", scode=winerror.DISP_E_TYPEMISMATCH) --- 74,78 ---- key = args[0] ! if type(key) not in [str, unicode]: ### the nArgErr thing should be 0-based, not reversed... sigh raise COMException(desc="Key must be a string", scode=winerror.DISP_E_TYPEMISMATCH) |
From: Mark H. <mha...@us...> - 2008-12-17 03:53:16
|
Update of /cvsroot/pywin32/pywin32/isapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25393 Modified Files: install.py Log Message: a couple of trivial pychecker issues, plus restore b/w compat Index: install.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/install.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** install.py 17 Dec 2008 00:00:04 -0000 1.15 --- install.py 17 Dec 2008 03:53:10 -0000 1.16 *************** *** 90,94 **** def __init__(self, **kw): self.__dict__.update(kw) ! def __str__(self): "Format this parameter suitable for IIS" --- 90,94 ---- def __init__(self, **kw): self.__dict__.update(kw) ! def __str__(self): "Format this parameter suitable for IIS" *************** *** 180,184 **** raise ItemNotFound(msg) return server ! def FindWebServer(options, server_desc): """ --- 180,184 ---- raise ItemNotFound(msg) return server ! def FindWebServer(options, server_desc): """ *************** *** 241,245 **** # Also seen the Class change to a generic IISObject - so nuke # *any* existing object, regardless of Class ! existing = iis_dir.Delete('', name) log(2, "Deleted old directory '%s'" % (name,)) except pythoncom.com_error: --- 241,245 ---- # Also seen the Class change to a generic IISObject - so nuke # *any* existing object, regardless of Class ! iis_dir.Delete('', name) log(2, "Deleted old directory '%s'" % (name,)) except pythoncom.com_error: *************** *** 568,572 **** return dll_name ! def InstallModule(conf_module_name, params, options, log): "Install the extension" if not hasattr(sys, "frozen"): --- 568,578 ---- return dll_name ! # Note the 'log' params to these 'builtin' args - old versions of pywin32 ! # didn't log at all in this function (by intent; anyone calling this was ! # responsible). So existing code that calls this function with the old ! # signature (ie, without a 'log' param) still gets the same behaviour as ! # before... ! ! def InstallModule(conf_module_name, params, options, log=lambda *args:None): "Install the extension" if not hasattr(sys, "frozen"): *************** *** 580,584 **** log(1, "Installation complete.") ! def UninstallModule(conf_module_name, params, options, log): "Remove the extension" loader_dll = GetLoaderModuleName(conf_module_name, False) --- 586,590 ---- log(1, "Installation complete.") ! def UninstallModule(conf_module_name, params, options, log=lambda *args:None): "Remove the extension" loader_dll = GetLoaderModuleName(conf_module_name, False) *************** *** 587,591 **** log(1, "Uninstallation complete.") ! standard_arg_handlers = { "install" : InstallModule, "remove" : UninstallModule, --- 593,597 ---- log(1, "Uninstallation complete.") ! standard_arguments = { "install" : InstallModule, "remove" : UninstallModule, *************** *** 649,653 **** # build a usage string if we don't have one. if not parser.get_usage(): ! all_handlers = standard_arg_handlers.copy() all_handlers.update(custom_arg_handlers) parser.set_usage(build_usage(all_handlers)) --- 655,659 ---- # build a usage string if we don't have one. if not parser.get_usage(): ! all_handlers = standard_arguments.copy() all_handlers.update(custom_arg_handlers) parser.set_usage(build_usage(all_handlers)) *************** *** 680,683 **** traceback.print_exc() print "%s: %s" % (details.__class__.__name__, details) ! except KeyError, e: ! parser.error("Invalid arg '%s'" % arg) \ No newline at end of file --- 686,689 ---- traceback.print_exc() print "%s: %s" % (details.__class__.__name__, details) ! except KeyError: ! parser.error("Invalid arg '%s'" % arg) |
From: Jason R. C. <ja...@us...> - 2008-12-17 00:00:10
|
Update of /cvsroot/pywin32/pywin32/isapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12842 Modified Files: install.py Log Message: Fixed issue in ReallyCreateDirectory where an old variable name was lingering. Refactored HandleCommandLine to unify argument handlers. Index: install.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/install.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** install.py 16 Dec 2008 02:59:24 -0000 1.14 --- install.py 17 Dec 2008 00:00:04 -0000 1.15 *************** *** 255,259 **** # unless the directory exists on the filesystem. try: ! path = params.Path or webDir.Path newDir.Path = path except AttributeError: --- 255,259 ---- # unless the directory exists on the filesystem. try: ! path = params.Path or iis_dir.Path newDir.Path = path except AttributeError: *************** *** 568,572 **** return dll_name ! def InstallModule(conf_module_name, params, options): if not hasattr(sys, "frozen"): conf_module_name = os.path.abspath(conf_module_name) --- 568,573 ---- return dll_name ! def InstallModule(conf_module_name, params, options, log): ! "Install the extension" if not hasattr(sys, "frozen"): conf_module_name = os.path.abspath(conf_module_name) *************** *** 577,591 **** _PatchParamsModule(params, loader_dll) Install(params, options) ! def UninstallModule(conf_module_name, params, options): loader_dll = GetLoaderModuleName(conf_module_name, False) _PatchParamsModule(params, loader_dll, False) Uninstall(params, options) ! standard_arguments = { ! "install" : "Install the extension", ! "remove" : "Remove the extension" } # We support 2 ways of extending our command-line/install support. # * Many of the installation items allow you to specify "PreInstall", --- 578,613 ---- _PatchParamsModule(params, loader_dll) Install(params, options) + log(1, "Installation complete.") ! def UninstallModule(conf_module_name, params, options, log): ! "Remove the extension" loader_dll = GetLoaderModuleName(conf_module_name, False) _PatchParamsModule(params, loader_dll, False) Uninstall(params, options) + log(1, "Uninstallation complete.") ! standard_arg_handlers = { ! "install" : InstallModule, ! "remove" : UninstallModule, } + def build_usage(handler_map): + docstrings = [handler.__doc__ for handler in handler_map.values()] + all_args = dict(zip(handler_map.keys(), docstrings)) + arg_names = "|".join(all_args.keys()) + usage_string = "%prog [options] [" + arg_names + "]\n" + usage_string += "commands:\n" + for arg, desc in all_args.items(): + usage_string += " %-10s: %s" % (arg, desc) + "\n" + return usage_string[:-1] + + def MergeStandardOptions(options, params): + """ + Take an options object generated by the command line and merge + the values into the IISParameters object. + """ + pass + + # We support 2 ways of extending our command-line/install support. # * Many of the installation items allow you to specify "PreInstall", *************** *** 627,639 **** # build a usage string if we don't have one. if not parser.get_usage(): ! all_args = standard_arguments.copy() ! for arg, handler in custom_arg_handlers.items(): ! all_args[arg] = handler.__doc__ ! arg_names = "|".join(all_args.keys()) ! usage_string = "%prog [options] [" + arg_names + "]\n" ! usage_string += "commands:\n" ! for arg, desc in all_args.items(): ! usage_string += " %-10s: %s" % (arg, desc) + "\n" ! parser.set_usage(usage_string[:-1]) parser.add_option("-q", "--quiet", --- 649,659 ---- # build a usage string if we don't have one. if not parser.get_usage(): ! all_handlers = standard_arg_handlers.copy() ! all_handlers.update(custom_arg_handlers) ! parser.set_usage(build_usage(all_handlers)) ! ! # allow the user to use uninstall as a synonym for remove if it wasn't ! # defined by the custom arg handlers. ! all_handlers.setdefault('uninstall', all_handlers['remove']) parser.add_option("-q", "--quiet", *************** *** 648,651 **** --- 668,672 ---- (options, args) = parser.parse_args(argv[1:]) + MergeStandardOptions(options, params) verbose = options.verbose if not args: *************** *** 653,669 **** try: for arg in args: ! if arg == "install": ! InstallModule(conf_module_name, params, options) ! log(1, "Installation complete.") ! elif arg in ["remove", "uninstall"]: ! UninstallModule(conf_module_name, params, options) ! log(1, "Uninstallation complete.") ! else: ! handler = custom_arg_handlers.get(arg, None) ! if handler is None: ! parser.error("Invalid arg '%s'" % (arg,)) ! handler(options, log, arg) except (ItemNotFound, InstallationError), details: if options.verbose > 1: traceback.print_exc() print "%s: %s" % (details.__class__.__name__, details) --- 674,683 ---- try: for arg in args: ! handler = all_handlers[arg] ! handler(conf_module_name, params, options, log) except (ItemNotFound, InstallationError), details: if options.verbose > 1: traceback.print_exc() print "%s: %s" % (details.__class__.__name__, details) + except KeyError, e: + parser.error("Invalid arg '%s'" % arg) \ No newline at end of file |
From: Roger U. <ru...@us...> - 2008-12-16 09:01:58
|
Update of /cvsroot/pywin32/pywin32/win32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2971 Removed Files: Tag: py3k win32pipe.dsp Log Message: Remove project file --- win32pipe.dsp DELETED --- |
From: Roger U. <ru...@us...> - 2008-12-16 08:58:55
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2716 Modified Files: Tag: py3k setup.py Log Message: Specify source file for win32pipe, reenable win32security Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.81.2.10 retrieving revision 1.81.2.11 diff -C2 -d -r1.81.2.10 -r1.81.2.11 *** setup.py 11 Dec 2008 03:45:48 -0000 1.81.2.10 --- setup.py 16 Dec 2008 08:58:49 -0000 1.81.2.11 *************** *** 1441,1445 **** """), ("win32pdh", "", None), ! ("win32pipe", "", None), ("win32print", "winspool user32 gdi32", None, 0x0500), ("win32process", "advapi32 user32", None, 0x0500), --- 1441,1445 ---- """), ("win32pdh", "", None), ! ("win32pipe", "", True, None, 'win32/src/win32pipe.i'), ("win32print", "winspool user32 gdi32", None, 0x0500), ("win32process", "advapi32 user32", None, 0x0500), *************** *** 1620,1624 **** %(mapi)s/PyIProfSect.i %(mapi)s/PyIProfSect.cpp %(mapi)s/PyIMAPIAdviseSink.cpp - %(mapi)s/mapiutil.cpp %(mapi)s/mapiguids.cpp --- 1620,1623 ---- *************** *** 1935,1939 **** if is_py3k: py3k_skip_modules = \ ! """win32security adsi mapi isapi PyISAPI_loader""".split() ext_modules = [e for e in ext_modules if e.name not in py3k_skip_modules] --- 1934,1938 ---- if is_py3k: py3k_skip_modules = \ ! """adsi mapi isapi PyISAPI_loader""".split() ext_modules = [e for e in ext_modules if e.name not in py3k_skip_modules] |
From: Jason R. C. <ja...@us...> - 2008-12-16 02:59:31
|
Update of /cvsroot/pywin32/pywin32/isapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13781 Modified Files: install.py Log Message: Fixed error in AssignScriptMaps (for 'end' and 'start') Further refactoring to support installing in root of web site (just use '/' as the Name). Note, remove/uninstall still will not work. Moved directory type definition into parameters and defaults to 'IIS_WebVirtualDir'. Index: install.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/install.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** install.py 14 Dec 2008 23:19:12 -0000 1.13 --- install.py 16 Dec 2008 02:59:24 -0000 1.14 *************** *** 61,64 **** --- 61,65 ---- Headers = _DEFAULT_HEADERS Path = None # defaults to WWW root. + Type = _IIS_WEBVIRTUALDIR AccessExecute = _DEFAULT_ACCESS_EXECUTE AccessRead = _DEFAULT_ACCESS_READ *************** *** 139,147 **** description (case-insensitive). ! >>> LocateWebServer('Default Web Site') # doctest: +SKIP or ! >>> LocateWebServer('1') #doctest: +SKIP """ assert len(description) >= 1, "Server name or comment is required" --- 140,148 ---- description (case-insensitive). ! >>> LocateWebServerPath('Default Web Site') # doctest: +SKIP or ! >>> LocateWebServerPath('1') #doctest: +SKIP """ assert len(description) >= 1, "Server name or comment is required" *************** *** 151,155 **** # Name is generally a number, but no need to assume that. site_attributes = [getattr(site, attr, "").lower().strip() ! for attr in ("Name", "ServerComment")] if description in site_attributes: return site.AdsPath --- 152,156 ---- # Name is generally a number, but no need to assume that. site_attributes = [getattr(site, attr, "").lower().strip() ! for attr in ("Name", "ServerComment")] if description in site_attributes: return site.AdsPath *************** *** 196,217 **** return server.adsPath ! def CreateDirectory(params, options): ! _CallHook(params, "PreInstall", options) ! if not params.Name: ! raise ConfigurationError("No Name param") ! slash = params.Name.rfind("/") if slash >= 0: ! parent = params.Name[:slash] ! name = params.Name[slash+1:] else: parent = "" ! name = params.Name ! webDir = GetObject(FindPath(options, params.Server, parent)) ! if parent: ! # Note that the directory won't be visible in the IIS UI ! # unless the directory exists on the filesystem. ! keyType = _IIS_WEBDIR ! else: ! keyType = _IIS_WEBVIRTUALDIR # We used to go to lengths to keep an existing virtual directory # in place. However, in some cases the existing directories got --- 197,236 ---- return server.adsPath ! def old_split_path(path): ! slash = path.rfind("/") if slash >= 0: ! parent = path[:slash] ! name = path[slash+1:] else: parent = "" ! name = path ! return parent, name ! ! def split_path(path): ! """ ! Get the parent path and basename ! >>> old_split_path('/') == split_path('/') ! True ! ! >>> old_split_path('') == split_path('') ! True ! ! >>> old_split_path('foo') == split_path('foo') ! True ! ! >>> old_split_path('/foo') == split_path('/foo') ! True ! ! >>> old_split_path('/foo/bar') == split_path('/foo/bar') ! True ! ! >>> old_split_path('foo/bar') == split_path('foo/bar') ! False ! """ ! ! if not path.startswith('/'): path = '/' + path ! return tuple(path.rsplit('/', 1)) ! ! def ReallyCreateDirectory(iis_dir, name, params): # We used to go to lengths to keep an existing virtual directory # in place. However, in some cases the existing directories got *************** *** 222,240 **** # Also seen the Class change to a generic IISObject - so nuke # *any* existing object, regardless of Class ! existing = GetObject(FindPath(options, params.Server, params.Name)) ! webDir.Delete(existing.Class, existing.Name) ! log(2, "Deleted old directory '%s'" % (params.Name,)) except pythoncom.com_error: pass ! newDir = webDir.Create(keyType, name) ! log(2, "Creating new directory '%s'..." % (params.Name,)) friendly = params.Description or params.Name newDir.AppFriendlyName = friendly try: path = params.Path or webDir.Path newDir.Path = path except AttributeError: pass newDir.AppCreate2(params.AppProtection) --- 241,262 ---- # Also seen the Class change to a generic IISObject - so nuke # *any* existing object, regardless of Class ! existing = iis_dir.Delete('', name) ! log(2, "Deleted old directory '%s'" % (name,)) except pythoncom.com_error: pass ! newDir = iis_dir.Create(params.Type, name) ! log(2, "Creating new directory '%s' in %s..." % (name,iis_dir.Name)) friendly = params.Description or params.Name newDir.AppFriendlyName = friendly + + # Note that the new directory won't be visible in the IIS UI + # unless the directory exists on the filesystem. try: path = params.Path or webDir.Path newDir.Path = path except AttributeError: + # If params.Type is IIS_WEBDIRECTORY, an exception is thrown pass newDir.AppCreate2(params.AppProtection) *************** *** 252,261 **** newDir.DefaultDoc = params.DefaultDoc newDir.SetInfo() ! AssignScriptMaps(params.ScriptMaps, newDir, params.ScriptMapUpdate) ! _CallHook(params, "PostInstall", options, newDir) log(1, "Configured Virtual Directory: %s" % (params.Name,)) ! return newDir def AssignScriptMaps(script_maps, target, update='replace'): --- 274,297 ---- newDir.DefaultDoc = params.DefaultDoc newDir.SetInfo() + return newDir ! ! def CreateDirectory(params, options): ! _CallHook(params, "PreInstall", options) ! if not params.Name: ! raise ConfigurationError("No Name param") ! parent, name = split_path(params.Name) ! webDir = GetObject(FindPath(options, params.Server, parent)) ! ! # if '/' or '' was passed, we must be installing to the root. ! # In this case, name is blank. ! if name: ! webDir = ReallyCreateDirectory(webDir, name, params) ! ! AssignScriptMaps(params.ScriptMaps, webDir, params.ScriptMapUpdate) ! _CallHook(params, "PostInstall", options, webDir) log(1, "Configured Virtual Directory: %s" % (params.Name,)) ! return webDir def AssignScriptMaps(script_maps, target, update='replace'): *************** *** 280,284 **** def get_unique_items(sequence, reference): "Return items in sequence that can't be found in reference." ! return [item for item in sequence if item not in reference] def _AssignScriptMapsReplace(target, script_maps): --- 316,320 ---- def get_unique_items(sequence, reference): "Return items in sequence that can't be found in reference." ! return tuple([item for item in sequence if item not in reference]) def _AssignScriptMapsReplace(target, script_maps): |
From: Jason R. C. <ja...@us...> - 2008-12-14 23:19:18
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19292 Modified Files: CHANGES.txt Log Message: Refactored isapi.install to expose some of the previously-encapsulated functionality in FindWebServer and CreateDirectory. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** CHANGES.txt 11 Dec 2008 05:09:00 -0000 1.38 --- CHANGES.txt 14 Dec 2008 23:19:12 -0000 1.39 *************** *** 9,12 **** --- 9,15 ---- ---------------- + * Refactored isapi.install to expose some of the previously-encapsulated + functionality in FindWebServer and CreateDirectory. + * "Modernization" changes, instigated by py3k: |
From: Jason R. C. <ja...@us...> - 2008-12-14 23:19:18
|
Update of /cvsroot/pywin32/pywin32/isapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19292/isapi Modified Files: install.py Log Message: Refactored isapi.install to expose some of the previously-encapsulated functionality in FindWebServer and CreateDirectory. Index: install.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/install.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** install.py 26 Nov 2008 08:39:33 -0000 1.12 --- install.py 14 Dec 2008 23:19:12 -0000 1.13 *************** *** 4,7 **** --- 4,8 ---- # Created July 2004, Mark Hammond. import sys, os, imp, shutil, stat + import operator from win32com.client import GetObject, Dispatch from win32com.client.gencache import EnsureModule, EnsureDispatch *************** *** 34,42 **** _DEFAULT_ENABLE_DEFAULT_DOC = False ! is_debug_build = False ! for imp_ext, _, _ in imp.get_suffixes(): ! if imp_ext == "_d.pyd": ! is_debug_build = True ! break this_dir = os.path.abspath(os.path.dirname(__file__)) --- 35,40 ---- _DEFAULT_ENABLE_DEFAULT_DOC = False ! _extensions = [ext for ext, _, _ in imp.get_suffixes()] ! is_debug_build = '_d.pyd' in _extensions this_dir = os.path.abspath(os.path.dirname(__file__)) *************** *** 91,94 **** --- 89,101 ---- def __init__(self, **kw): self.__dict__.update(kw) + + def __str__(self): + "Format this parameter suitable for IIS" + items = [self.Extension, self.Module, self.Flags] + # IIS gets upset if there is a trailing verb comma, but no verbs + if self.Verbs: + items.append(self.Verbs) + items = [str(item) for item in items] + return ','.join(items) class ISAPIParameters: *************** *** 127,166 **** return FindWebServer(options, server)+"/ROOT"+name ! def FindWebServer(options, server_desc): ! # command-line options get first go, and are assumed in 'mbcs' encoding ! # (well, assumed MBCS by the time they got to sys.argv...) ! if options.server: ! server_desc = options.server ! # but someone may have explicitly already set unicode... ! if type(server_desc) != unicode: ! server_desc = server_desc.decode("mbcs") ! # If the config passed by the caller doesn't specify one, use the default ! if not server_desc: ! server = _IIS_OBJECT+"/1" ! else: ! # Assume the user has passed either the instance_id or "server ! # description" - loop over all objects until we find it. ! ob = GetObject(_IIS_OBJECT) ! look = server_desc.lower().strip() ! for sub in ob: ! # ID is generally a number, but no need to assume that. ! this_id = getattr(sub, "Name", "").lower().strip() ! this_comment = getattr(sub, "ServerComment", "").lower().strip() ! if this_id == look or this_comment == look: ! server = sub.AdsPath ! break ! else: ! raise ItemNotFound( ! "No web sites match the description '%s'" % (server_desc,)) ! # Check it is good. try: ! GetObject(server) except pythoncom.com_error, details: hr, msg, exc, arg_err = details if exc and exc[2]: msg = exc[2] ! raise ItemNotFound( ! "WebServer %s: %s" % (server, msg)) return server def CreateDirectory(params, options): --- 134,198 ---- return FindWebServer(options, server)+"/ROOT"+name ! def LocateWebServerPath(description): ! """ ! Find an IIS web server whose name or comment matches the provided ! description (case-insensitive). ! ! >>> LocateWebServer('Default Web Site') # doctest: +SKIP ! ! or ! ! >>> LocateWebServer('1') #doctest: +SKIP ! """ ! assert len(description) >= 1, "Server name or comment is required" ! iis = GetObject(_IIS_OBJECT) ! description = description.lower().strip() ! for site in iis: ! # Name is generally a number, but no need to assume that. ! site_attributes = [getattr(site, attr, "").lower().strip() ! for attr in ("Name", "ServerComment")] ! if description in site_attributes: ! return site.AdsPath ! msg = "No web sites match the description '%s'" % description ! raise ItemNotFound(msg) ! ! def GetWebServer(description = None): ! """ ! Load the web server instance (COM object) for a given instance ! or description. ! If None is specified, the default website is retrieved (indicated ! by the identifier 1. ! """ ! description = description or "1" ! path = LocateWebServerPath(description) ! server = LoadWebServer(path) ! return server ! ! def LoadWebServer(path): try: ! server = GetObject(path) except pythoncom.com_error, details: hr, msg, exc, arg_err = details if exc and exc[2]: msg = exc[2] ! msg = "WebServer %s: %s" % (path, msg) ! raise ItemNotFound(msg) return server + + def FindWebServer(options, server_desc): + """ + Legacy function to allow options to define a .server property + to override the other parameter. Use GetWebServer instead. + """ + # options takes precedence + server_desc = options.server or server_desc + # make sure server_desc is unicode (could be mbcs if passed in + # sys.argv). + if server_desc and not isinstance(server_desc, unicode): + server_desc = server_desc.decode('mbcs') + + # get the server (if server_desc is None, the default site is acquired) + server = GetWebServer(server_desc) + return server.adsPath def CreateDirectory(params, options): *************** *** 220,248 **** newDir.DefaultDoc = params.DefaultDoc newDir.SetInfo() ! smp_items = [] ! for smp in params.ScriptMaps: ! item = "%s,%s,%s" % (smp.Extension, smp.Module, smp.Flags) ! # IIS gets upset if there is a trailing verb comma, but no verbs ! if smp.Verbs: ! item += "," + smp.Verbs ! smp_items.append(item) ! if params.ScriptMapUpdate == "replace": ! newDir.ScriptMaps = smp_items ! elif params.ScriptMapUpdate == "end": ! for item in smp_items: ! if item not in newDir.ScriptMaps: ! newDir.ScriptMaps = newDir.ScriptMaps + (item,) ! elif params.ScriptMapUpdate == "start": ! for item in smp_items: ! if item not in newDir.ScriptMaps: ! newDir.ScriptMaps = (item,) + newDir.ScriptMaps ! else: ! raise ConfigurationError( ! "Unknown ScriptMapUpdate option '%s'" % (params.ScriptMapUpdate,)) ! newDir.SetInfo() _CallHook(params, "PostInstall", options, newDir) log(1, "Configured Virtual Directory: %s" % (params.Name,)) return newDir def CreateISAPIFilter(filterParams, options): server = FindWebServer(options, filterParams.Server) --- 252,296 ---- newDir.DefaultDoc = params.DefaultDoc newDir.SetInfo() ! ! AssignScriptMaps(params.ScriptMaps, newDir, params.ScriptMapUpdate) ! _CallHook(params, "PostInstall", options, newDir) log(1, "Configured Virtual Directory: %s" % (params.Name,)) return newDir + def AssignScriptMaps(script_maps, target, update='replace'): + """ + @param script_maps ScriptMapParameter[] + @param target An IIS Virtual Directory to assign the script maps + @param update How to update the maps ('start', 'end', or 'replace') + """ + # determine which function to use to assign script maps + script_map_func = '_AssignScriptMaps' + update.capitalize() + try: + script_map_func = eval(script_map_func) + except NameError: + msg = "Unknown ScriptMapUpdate option '%s'" % update + raise ConfigurationError(msg) + # use the str method to format the script maps for IIS + script_maps = [str(s) for s in script_maps] + # call the correct function + script_map_func(target, script_maps) + target.SetInfo() + + def get_unique_items(sequence, reference): + "Return items in sequence that can't be found in reference." + return [item for item in sequence if item not in reference] + + def _AssignScriptMapsReplace(target, script_maps): + target.ScriptMaps = script_maps + + def _AssignScriptMapsEnd(target, script_maps): + unique_new_maps = get_unique_items(script_maps, target.ScriptMaps) + target.ScriptMaps = target.ScriptMaps + unique_new_maps + + def _AssignScriptMapsStart(target, script_maps): + unique_new_maps = get_unique_items(script_maps, target.ScriptMaps) + target.ScriptMaps = unique_new_maps + target.ScriptMaps + def CreateISAPIFilter(filterParams, options): server = FindWebServer(options, filterParams.Server) |
From: Roger U. <ru...@us...> - 2008-12-13 10:17:14
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21909 Modified Files: Tag: py3k AXDebug.cpp Log Message: Use new name for module init macro Index: AXDebug.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v retrieving revision 1.4.4.2 retrieving revision 1.4.4.3 diff -C2 -d -r1.4.4.2 -r1.4.4.3 *** AXDebug.cpp 9 Dec 2008 12:38:52 -0000 1.4.4.2 --- AXDebug.cpp 13 Dec 2008 10:17:09 -0000 1.4.4.3 *************** *** 280,284 **** }; ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) RETURN_ERROR; /* Module initialisation */ --- 280,284 ---- }; ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) PYWIN_MODULE_INIT_RETURN_ERROR; /* Module initialisation */ *************** *** 293,297 **** axdebug_Error = PyErr_NewException("axdebug.error", NULL, NULL); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! RETURN_ERROR; // AX-Debugging interface registration --- 293,297 ---- axdebug_Error = PyErr_NewException("axdebug.error", NULL, NULL); if (axdebug_Error == NULL || PyDict_SetItemString(dict, "error", axdebug_Error) != 0) ! PYWIN_MODULE_INIT_RETURN_ERROR; // AX-Debugging interface registration |
From: Roger U. <ru...@us...> - 2008-12-12 01:25:59
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20298 Modified Files: Tag: py3k dynamic.py Log Message: isinstance in Python 3 will only accept a tuple of types Index: dynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v retrieving revision 1.22.2.7 retrieving revision 1.22.2.8 diff -C2 -d -r1.22.2.7 -r1.22.2.8 *** dynamic.py 4 Dec 2008 05:08:41 -0000 1.22.2.7 --- dynamic.py 12 Dec 2008 01:25:54 -0000 1.22.2.8 *************** *** 73,77 **** dispatchType = pythoncom.TypeIIDs[pythoncom.IID_IDispatch] iunkType = pythoncom.TypeIIDs[pythoncom.IID_IUnknown] ! _GoodDispatchTypes=[str, IIDType, str] _defaultDispatchItem=build.DispatchItem --- 73,79 ---- dispatchType = pythoncom.TypeIIDs[pythoncom.IID_IDispatch] iunkType = pythoncom.TypeIIDs[pythoncom.IID_IUnknown] ! ! ## Py3k requires a tuple for isinstance ! _GoodDispatchTypes=(str, IIDType) _defaultDispatchItem=build.DispatchItem |
From: Mark H. <mha...@us...> - 2008-12-11 07:17:51
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2518/win32/test Modified Files: Tag: py3k test_win32inet.py Log Message: merge test/demo fixes from the trunk Index: test_win32inet.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32inet.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 *** test_win32inet.py 26 Nov 2008 09:03:31 -0000 1.1.4.1 --- test_win32inet.py 11 Dec 2008 07:17:46 -0000 1.1.4.2 *************** *** 40,44 **** def testFtpCommand(self): ! hcon = InternetConnect(self.hi, "ftp.python.org", INTERNET_INVALID_PORT_NUMBER, None, None, # username/password INTERNET_SERVICE_FTP, 0, 0) --- 40,46 ---- def testFtpCommand(self): ! # ftp.python.org doesn't exist. ftp.gnu.org is what Python's urllib ! # test code uses. ! hcon = InternetConnect(self.hi, "ftp.gnu.org", INTERNET_INVALID_PORT_NUMBER, None, None, # username/password INTERNET_SERVICE_FTP, 0, 0) |
From: Mark H. <mha...@us...> - 2008-12-11 07:17:51
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2518/win32/Demos Modified Files: Tag: py3k SystemParametersInfo.py desktopmanager.py eventLogDemo.py Log Message: merge test/demo fixes from the trunk Index: desktopmanager.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/desktopmanager.py,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** desktopmanager.py 29 Aug 2008 04:59:23 -0000 1.2.2.1 --- desktopmanager.py 11 Dec 2008 07:17:46 -0000 1.2.2.2 *************** *** 3,7 **** import win32api, win32con, win32gui, win32service, win32process import pywintypes ! import traceback, _thread, time, io ## "Shell_TrayWnd" is class of system tray window, broadcasts "TaskbarCreated" when initialized --- 3,8 ---- import win32api, win32con, win32gui, win32service, win32process import pywintypes ! import traceback, _thread, time ! import io ## "Shell_TrayWnd" is class of system tray window, broadcasts "TaskbarCreated" when initialized Index: eventLogDemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/eventLogDemo.py,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 *** eventLogDemo.py 11 Dec 2008 07:06:51 -0000 1.5.4.3 --- eventLogDemo.py 11 Dec 2008 07:17:46 -0000 1.5.4.4 *************** *** 42,46 **** win32evtlog.CloseEventLog(h) ! def Usage(): print("Writes an event to the event log.") print("-w : Dont write any test records.") --- 42,46 ---- win32evtlog.CloseEventLog(h) ! def usage(): print("Writes an event to the event log.") print("-w : Dont write any test records.") *************** *** 75,79 **** computer = val if opt in ['-h', '-?']: ! Usage() return if opt=='-r': --- 75,79 ---- computer = val if opt in ['-h', '-?']: ! usage() return if opt=='-r': Index: SystemParametersInfo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/SystemParametersInfo.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 *** SystemParametersInfo.py 29 Aug 2008 04:59:23 -0000 1.1.4.1 --- SystemParametersInfo.py 11 Dec 2008 07:17:46 -0000 1.1.4.2 *************** *** 8,12 **** ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", --- 8,13 ---- ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", ! "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", *************** *** 22,26 **** new_value=win32gui.SystemParametersInfo(cget) print('\tnew value:',new_value) ! assert new_value==orig_value+1 win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value --- 23,31 ---- new_value=win32gui.SystemParametersInfo(cget) print('\tnew value:',new_value) ! # On Vista, some of these values seem to be ignored. So only "fail" if ! # the new value isn't what we set or the original ! if new_value!=orig_value+1: ! assert new_value == orig_value ! print("Strange - setting %s seems to have been ignored" % (pname,)) win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value |
From: Mark H. <mha...@us...> - 2008-12-11 07:17:30
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2485/com/win32comext/mapi Modified Files: Tag: py3k mapiutil.py Log Message: py2 and 3 friendly typemap Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.5.4.4 retrieving revision 1.5.4.5 diff -C2 -d -r1.5.4.4 -r1.5.4.5 *** mapiutil.py 11 Dec 2008 05:45:21 -0000 1.5.4.4 --- mapiutil.py 11 Dec 2008 07:17:24 -0000 1.5.4.5 *************** *** 106,110 **** 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)). --- 106,110 ---- type(0): mapitags.PT_I4, type(''.encode('ascii')): mapitags.PT_STRING8, # str in py2x, bytes in 3x ! type(''): mapitags.PT_UNICODE, # unicode in py2x, str in 3x type(None): mapitags.PT_UNSPECIFIED, # In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)). |
From: Mark H. <mha...@us...> - 2008-12-11 07:06:58
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1813/win32/test Modified Files: Tag: py3k test_win32file.py testall.py Log Message: merge various changes from the trunk Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.13.2.3 retrieving revision 1.13.2.4 diff -C2 -d -r1.13.2.3 -r1.13.2.4 *** test_win32file.py 23 Oct 2008 09:45:16 -0000 1.13.2.3 --- test_win32file.py 11 Dec 2008 07:06:51 -0000 1.13.2.4 *************** *** 65,71 **** # GetFileAttributesEx/GetFileAttributesExW tests. - print (win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName)) self.failUnlessEqual(win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName)) - ## "ERROR: Expected GetFileAttributesEx and GetFileAttributesExW to return the same data") attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName) --- 65,69 ---- *************** *** 232,235 **** --- 230,235 ---- t = threading.Thread(target=self._IOCPServerThread, args=(handle,port, test_overlapped_death)) + # hrmph - markh is seeing failures here on x64 - and a hang! + t.setDaemon(True) # avoid hanging entire test suite on failure. t.start() try: *************** *** 243,247 **** finally: handle.Close() ! t.join() def testCompletionPortsNonQueuedBadReference(self): --- 243,248 ---- finally: handle.Close() ! t.join(3) ! self.failIf(t.isAlive(), "thread didn't finish") def testCompletionPortsNonQueuedBadReference(self): *************** *** 293,299 **** t.start() running.wait(2) ! if not running.is_set(): self.fail("AcceptEx Worker thread failed to start") ! s = socket.create_connection(('127.0.0.1', port), 10) win32file.WSASend(s, b"hello", None) overlapped = pywintypes.OVERLAPPED() --- 294,301 ---- t.start() running.wait(2) ! if not running.isSet(): self.fail("AcceptEx Worker thread failed to start") ! s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ! s.connect(('127.0.0.1', port)) win32file.WSASend(s, b"hello", None) overlapped = pywintypes.OVERLAPPED() *************** *** 396,407 **** while 1: try: ! print ("waiting", dh) changes = win32file.ReadDirectoryChangesW(dh, 8192, False, #sub-tree flags) ! print ("got", changes) except: ! traceback.print_exc() changes.extend(changes) --- 398,409 ---- while 1: try: ! print("waiting", dh) changes = win32file.ReadDirectoryChangesW(dh, 8192, False, #sub-tree flags) ! print("got", changes) except: ! raise changes.extend(changes) *************** *** 434,438 **** return else: ! print ("ERROR: Watcher thread timed-out!") return # kill the thread! --- 436,440 ---- return else: ! print("ERROR: Watcher thread timed-out!") return # kill the thread! *************** *** 448,458 **** shutil.rmtree(dn) except OSError: ! print ("FAILED to remove directory", dn) for t in self.watcher_threads: # closing dir handle should have killed threads! t.join(5) ! if t.is_alive(): ! print ("FAILED to wait for thread termination") def stablize(self): --- 450,460 ---- shutil.rmtree(dn) except OSError: ! print("FAILED to remove directory", dn) for t in self.watcher_threads: # closing dir handle should have killed threads! t.join(5) ! if t.isAlive(): ! print("FAILED to wait for thread termination") def stablize(self): *************** *** 492,496 **** if details.winerror != winerror.ERROR_ACCESS_DENIED: raise ! print ("It appears this is not NTFS - cant encrypt/decrypt") win32file.DecryptFile(fname) finally: --- 494,498 ---- if details.winerror != winerror.ERROR_ACCESS_DENIED: raise ! print("It appears this is not NTFS - cant encrypt/decrypt") win32file.DecryptFile(fname) finally: Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -C2 -d -r1.6.2.4 -r1.6.2.5 *** testall.py 11 Dec 2008 04:24:25 -0000 1.6.2.4 --- testall.py 11 Dec 2008 07:06:51 -0000 1.6.2.5 *************** *** 31,37 **** stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ! p.wait() rc = p.returncode - output = p.stdout.read() except ImportError: # py2.3? --- 31,36 ---- stdout=subprocess.PIPE, stderr=subprocess.STDOUT) ! output, _ = p.communicate() rc = p.returncode except ImportError: # py2.3? |