pywin32-checkins Mailing List for Python for Windows Extensions (Page 76)
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-05-30 23:11:29
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8949 Modified Files: pywin32_postinstall.py Log Message: Look for the MFC DLL next to win32ui to better support MFC as a SxS ass. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** pywin32_postinstall.py 24 May 2008 07:20:58 -0000 1.24 --- pywin32_postinstall.py 30 May 2008 23:11:35 -0000 1.25 *************** *** 424,429 **** mfc_dll = "mfc90.dll" try: ! # It might be next to pythonwin itself. ! if not os.path.isfile(os.path.join(lib_dir, "pythonwin", mfc_dll): win32api.SearchPath(None, mfc_dll) except win32api.error: --- 424,430 ---- mfc_dll = "mfc90.dll" try: ! # It might be next to pythonwin itself (which is where setup.py ! # currently arranges for it to be installed...) ! if not os.path.isfile(os.path.join(lib_dir, "pythonwin", mfc_dll)): win32api.SearchPath(None, mfc_dll) except win32api.error: |
From: Roger U. <ru...@us...> - 2008-05-30 23:04:09
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6683 Modified Files: PyWinTypesmodule.cpp Log Message: Fix socket conversion on 64-bit Index: PyWinTypesmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypesmodule.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** PyWinTypesmodule.cpp 12 Feb 2008 03:09:06 -0000 1.38 --- PyWinTypesmodule.cpp 30 May 2008 23:04:14 -0000 1.39 *************** *** 59,107 **** PyObject *out = NULL; ! if (PyInt_Check(obSocket)) ! { ! *ps = (SOCKET)PyInt_AS_LONG(obSocket); ! } ! else ! { ! o = PyObject_GetAttrString(obSocket, "fileno"); ! if (o == NULL) ! { ! PyErr_Clear(); ! PyErr_SetString(PyExc_TypeError, "socket instance does not have the socket in the 'fileno' attribute"); ! return FALSE; ! } ! if (PyInt_Check(o)) ! { ! *ps = (SOCKET)PyInt_AS_LONG(o); ! } ! else if (PyCallable_Check(o)) ! { ! out = PyObject_CallObject(o, NULL); ! if (out == NULL) ! { ! Py_DECREF(o); ! return FALSE; ! } ! if (PyInt_Check(out)) ! { ! *ps = (SOCKET)PyInt_AS_LONG(out); ! } ! else ! { ! Py_DECREF(o); ! PyErr_SetString(PyExc_TypeError, "socket instance's 'fileno' attribute is not a socket"); ! return FALSE; ! } } ! else ! { ! Py_DECREF(o); ! PyErr_SetString(PyExc_TypeError, "socket instance's 'fileno' attribute is not a socket"); return FALSE; } ! Py_DECREF(o); ! } ! return TRUE; } --- 59,87 ---- PyObject *out = NULL; ! // Most common case, a python socket object (which apparently has no public C API) ! o = PyObject_GetAttrString(obSocket, "fileno"); ! if (o == NULL){ ! // Not a socket object, attempt direct conversion to integer handle ! PyErr_Clear(); ! out=obSocket; ! Py_INCREF(out); } ! else if (PyCallable_Check(o)){ ! // Normal socket object, whose fileno() method returns the integer handle ! out = PyObject_CallObject(o, NULL); ! Py_DECREF(o); ! if (out==NULL) return FALSE; } ! else // ??? fileno may be a number, rather than a method that returns a number ??? ! out=o; ! ! BOOL bsuccess=PyWinLong_AsVoidPtr(out, (void **)ps); ! Py_DECREF(out); ! if (!bsuccess){ ! PyErr_Clear(); ! PyErr_SetString(PyExc_TypeError, "Expected a socket object or numeric socket handle"); ! } ! return bsuccess; } |
From: Mark H. <mha...@us...> - 2008-05-28 05:10:52
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14909 Modified Files: setup.py Log Message: * Enable UAC control now py 2.6 trunk has the support. * Don't run the post-install script if 'install' is to a temp dir. Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** setup.py 24 May 2008 07:20:58 -0000 1.72 --- setup.py 28 May 2008 05:09:17 -0000 1.73 *************** *** 1115,1119 **** # XXX - hmm - a closer look at distutils shows it only uses win32api # if _winreg fails - and this never should. Need to revisit this! ! if not self.dry_run and not self.skip_build: # What executable to use? This one I guess. filename = os.path.join(os.path.dirname(this_file), "pywin32_postinstall.py") --- 1115,1123 ---- # XXX - hmm - a closer look at distutils shows it only uses win32api # if _winreg fails - and this never should. Need to revisit this! ! # If self.root has a value, it means we are being "installed" into ! # some other directory than Python itself (eg, into a temp directory ! # for bdist_wininst to use) - in which case we must *not* run our ! # installer ! if not self.dry_run and not self.skip_build and not self.root: # What executable to use? This one I guess. filename = os.path.join(os.path.dirname(this_file), "pywin32_postinstall.py") *************** *** 1821,1825 **** {"install_script": "pywin32_postinstall.py", "title": "pywin32-%s" % (build_id,), ! # "user_access_control": "auto", }, "bdist_msi": --- 1825,1829 ---- {"install_script": "pywin32_postinstall.py", "title": "pywin32-%s" % (build_id,), ! "user_access_control": "auto", }, "bdist_msi": |
From: Mark H. <mha...@us...> - 2008-05-28 04:32:19
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32483/test Modified Files: test_win32file.py Log Message: As noticed by Roger, AcceptEx and WSARecv used the buffer interface incorrectly, so allowed you to pass strings as a buffer that would be modified! Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** test_win32file.py 20 Nov 2006 22:21:48 -0000 1.12 --- test_win32file.py 28 May 2008 04:32:22 -0000 1.13 *************** *** 9,12 **** --- 9,13 ---- import time import shutil + import socket class TestSimpleOps(unittest.TestCase): *************** *** 155,160 **** # Mainly checking that we can "associate" an existing handle. This # failed in build 203. - import socket - ioport = win32file.CreateIoCompletionPort(win32file.INVALID_HANDLE_VALUE, 0, 0, 0) --- 156,159 ---- *************** *** 253,256 **** --- 252,315 ---- d[overlapped] = "hello" + class TestSocketExtensions(unittest.TestCase): + def acceptWorker(self, port, running_event, stopped_event): + listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + listener.bind(('', port)) + listener.listen(200) + + # create accept socket + accepter = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + # An overlapped + overlapped = pywintypes.OVERLAPPED() + overlapped.hEvent = win32event.CreateEvent(None, 0, 0, None) + # accept the connection. + # We used to allow strings etc to be passed here, and they would be + # modified! Obviously this is evil :) + buffer = " " * 1024 # EVIL - SHOULD NOT BE ALLOWED. + self.assertRaises(TypeError, win32file.AcceptEx, listener, accepter, buffer, overlapped) + + # This is the correct way to allocate the buffer... + buffer = win32file.AllocateReadBuffer(1024) + rc = win32file.AcceptEx(listener, accepter, buffer, overlapped) + self.failUnlessEqual(rc, winerror.ERROR_IO_PENDING) + # Set the event to say we are all ready + running_event.set() + # and wait for the connection. + rc = win32event.WaitForSingleObject(overlapped.hEvent, 2000) + if rc == win32event.WAIT_TIMEOUT: + self.fail("timed out waiting for a connection") + nbytes = win32file.GetOverlappedResult(listener.fileno(), overlapped, False) + #fam, loc, rem = win32file.GetAcceptExSockaddrs(accepter, buffer) + accepter.send(buffer[:nbytes]) + # NOT set in a finally - this means *successfully* stopped! + stopped_event.set() + + def testAcceptEx(self): + port = 4680 + running = threading.Event() + stopped = threading.Event() + t = threading.Thread(target=self.acceptWorker, args=(port, running,stopped)) + t.start() + running.wait(2) + if not running.isSet(): + self.fail("AcceptEx Worker thread failed to start") + s = socket.create_connection(('127.0.0.1', port), 10) + win32file.WSASend(s, "hello", None) + overlapped = pywintypes.OVERLAPPED() + overlapped.hEvent = win32event.CreateEvent(None, 0, 0, None) + # Like above - WSARecv used to allow strings as the receive buffer!! + buffer = " " * 10 + self.assertRaises(TypeError, win32file.WSARecv, s, buffer, overlapped) + # This one should work :) + buffer = win32file.AllocateReadBuffer(10) + win32file.WSARecv(s, buffer, overlapped) + nbytes = win32file.GetOverlappedResult(s.fileno(), overlapped, True) + got = buffer[:nbytes] + self.failUnlessEqual(got, "hello") + # thread should have stopped + stopped.wait(2) + if not stopped.isSet(): + self.fail("AcceptEx Worker thread failed to successfully stop") + class TestFindFiles(unittest.TestCase): def testIter(self): |
From: Mark H. <mha...@us...> - 2008-05-28 04:32:16
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32483/src Modified Files: win32file.i Log Message: As noticed by Roger, AcceptEx and WSARecv used the buffer interface incorrectly, so allowed you to pass strings as a buffer that would be modified! Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** win32file.i 4 May 2008 10:44:14 -0000 1.90 --- win32file.i 28 May 2008 04:32:21 -0000 1.91 *************** *** 1682,1691 **** } ! if (obBuf->ob_type->tp_as_buffer) { pORB = obBuf; Py_INCREF(pORB); pb = pORB->ob_type->tp_as_buffer; ! dwBufSize = (*pb->bf_getreadbuffer)(pORB, 0, &buf); if (dwBufSize < (DWORD)iMinBufferSize ) { --- 1682,1693 ---- } ! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getwritebuffer) { pORB = obBuf; Py_INCREF(pORB); pb = pORB->ob_type->tp_as_buffer; ! dwBufSize = (*pb->bf_getwritebuffer)(pORB, 0, &buf); ! if (dwBufSize==(DWORD)-1 && PyErr_Occurred()) ! goto Error; if (dwBufSize < (DWORD)iMinBufferSize ) { *************** *** 1839,1843 **** iMinBufferSize = (wsProtInfo.iMaxSockAddr + 16) * 2; ! if (obBuf->ob_type->tp_as_buffer) { pORB = obBuf; --- 1841,1845 ---- iMinBufferSize = (wsProtInfo.iMaxSockAddr + 16) * 2; ! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getreadbuffer) { pORB = obBuf; *************** *** 1845,1848 **** --- 1847,1852 ---- pb = pORB->ob_type->tp_as_buffer; dwBufSize = (*pb->bf_getreadbuffer)(pORB, 0, &buf); + if (dwBufSize==(DWORD)-1 && PyErr_Occurred()) + goto Error; if (dwBufSize < (DWORD)iMinBufferSize ) { *************** *** 2036,2044 **** wsBuf.len = PyString_GET_SIZE(obBuf); } ! else if (obBuf->ob_type->tp_as_buffer) { Py_INCREF(obBuf); pb = obBuf->ob_type->tp_as_buffer; wsBuf.len = (*pb->bf_getreadbuffer)(obBuf, 0, (void **)&wsBuf.buf); } else --- 2040,2050 ---- wsBuf.len = PyString_GET_SIZE(obBuf); } ! else if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getreadbuffer) { Py_INCREF(obBuf); pb = obBuf->ob_type->tp_as_buffer; wsBuf.len = (*pb->bf_getreadbuffer)(obBuf, 0, (void **)&wsBuf.buf); + if (wsBuf.len==(u_long)-1 && PyErr_Occurred()) + return NULL; } else *************** *** 2141,2149 **** } ! if (obBuf->ob_type->tp_as_buffer) { Py_INCREF(obBuf); pb = obBuf->ob_type->tp_as_buffer; ! wsBuf.len = (*pb->bf_getreadbuffer)(obBuf, 0, (void **)&wsBuf.buf); } else --- 2147,2157 ---- } ! if (obBuf->ob_type->tp_as_buffer && obBuf->ob_type->tp_as_buffer->bf_getwritebuffer) { Py_INCREF(obBuf); pb = obBuf->ob_type->tp_as_buffer; ! wsBuf.len = (*pb->bf_getwritebuffer)(obBuf, 0, (void **)&wsBuf.buf); ! if (wsBuf.len==(u_long)-1 && PyErr_Occurred()) ! return NULL; } else |
From: Roger U. <ru...@us...> - 2008-05-25 00:44:42
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19331 Modified Files: win32pdhmodule.cpp Log Message: Allow ConnectMachine to Accept None for local machine Index: win32pdhmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32pdhmodule.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** win32pdhmodule.cpp 16 Aug 2007 09:18:31 -0000 1.16 --- win32pdhmodule.cpp 25 May 2008 00:44:43 -0000 1.17 *************** *** 1014,1018 **** return NULL; TCHAR *path; ! if (!PyWinObject_AsTCHAR(obPath, &path, FALSE)) return NULL; --- 1014,1018 ---- return NULL; TCHAR *path; ! if (!PyWinObject_AsTCHAR(obPath, &path, TRUE)) return NULL; |
From: Roger U. <ru...@us...> - 2008-05-25 00:34:23
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15598 Modified Files: PyOVERLAPPED.cpp PyWinObjects.h Log Message: 64-bit fixes for PyOVERLAPPED Make all properties visible to dir() Index: PyWinObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyWinObjects.h 6 Feb 2008 18:37:46 -0000 1.13 --- PyWinObjects.h 25 May 2008 00:34:23 -0000 1.14 *************** *** 141,145 **** sMyOverlapped(const OVERLAPPED &o) : OVERLAPPED(o) {obState=NULL;dwValue=0;} }; ! OVERLAPPED *GetOverlapped() {return &m_overlapped;} --- 141,145 ---- sMyOverlapped(const OVERLAPPED &o) : OVERLAPPED(o) {obState=NULL;dwValue=0;} }; ! PyObject *obDummy; OVERLAPPED *GetOverlapped() {return &m_overlapped;} Index: PyOVERLAPPED.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyOVERLAPPED.cpp 3 Jun 2007 14:53:07 -0000 1.13 --- PyOVERLAPPED.cpp 25 May 2008 00:34:23 -0000 1.14 *************** *** 19,22 **** --- 19,23 ---- // The object can then be passed to any function which takes an OVERLAPPED object, and // the object attributes will be automatically updated. + PYWINTYPES_EXPORT BOOL PyWinObject_AsOVERLAPPED(PyObject *ob, OVERLAPPED **ppOverlapped, BOOL bNoneOK /*= TRUE*/) { *************** *** 86,97 **** /*static*/ struct memberlist PyOVERLAPPED::memberlist[] = { ! {"Internal", T_INT, OFF(m_overlapped.Internal)}, // @prop integer|Internal|Reserved for operating system use. ! {"InternalHigh",T_INT, OFF(m_overlapped.InternalHigh)}, // @prop integer|InternalHigh|Reserved for operating system use. ! {"Offset", T_INT, OFF(m_overlapped.Offset)}, // @prop integer|Offset|Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices. ! {"OffsetHigh", T_INT, OFF(m_overlapped.OffsetHigh)}, // @prop integer|OffsetHigh|Specifies the high word of the byte offset at which to start the transfer. {NULL} }; - // @prop integer/<o PyHANDLE>|hEvent|Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the <om win32file.ReadFile>, <om win32file.WriteFile>, <om win32pipe.ConnectNamedPipe>, or <om win32pipe.TransactNamedPipe> function. - // @prop object|object|Any python object that you want to attach to your overlapped I/O request. PyOVERLAPPED::PyOVERLAPPED(void) --- 87,101 ---- /*static*/ struct memberlist PyOVERLAPPED::memberlist[] = { ! {"Offset", T_ULONG, OFF(m_overlapped.Offset)}, // @prop integer|Offset|Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices. ! {"OffsetHigh", T_ULONG, OFF(m_overlapped.OffsetHigh)}, // @prop integer|OffsetHigh|Specifies the high word of the byte offset at which to start the transfer. ! {"object", T_OBJECT, OFF(m_overlapped.obState)}, // @prop object|object|Any python object that you want to attach to your overlapped I/O request. ! {"dword", T_ULONG, OFF(m_overlapped.dwValue)}, // @prop int|dword|An integer buffer that may be used by overlapped functions (eg, <om win32file.WaitCommEvent>) ! ! // These are handled by PyOVERLAPPED::getattr, included here so they show up as attributes ! {"hEvent", T_OBJECT, OFF(obDummy)}, // @prop <o PyHANDLE>|hEvent|Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the <om win32file.ReadFile>, <om win32file.WriteFile>, <om win32pipe.ConnectNamedPipe>, or <om win32pipe.TransactNamedPipe> function. ! {"Internal", T_OBJECT, OFF(obDummy)}, // @prop integer|Internal|Reserved for operating system use. (pointer-sized value) ! {"InternalHigh",T_OBJECT, OFF(obDummy)}, // @prop integer|InternalHigh|Reserved for operating system use. (pointer-sized value) {NULL} }; PyOVERLAPPED::PyOVERLAPPED(void) *************** *** 101,104 **** --- 105,109 ---- memset(&m_overlapped, 0, sizeof(m_overlapped)); m_obHandle = NULL; + obDummy = NULL; } *************** *** 134,138 **** PyObject *PyOVERLAPPED::getattr(PyObject *self, char *name) { - // @prop integer/<o PyHANDLE>|hEvent|Identifies an event set to the signaled state when the transfer has been completed. The calling process sets this member before calling the <om win32file.ReadFile>, <om win32file.WriteFile>, <om win32pipe.ConnectNamedPipe>, or <om win32pipe.TransactNamedPipe> function. if (strcmp("hEvent", name)==0) { PyOVERLAPPED *pO = (PyOVERLAPPED *)self; --- 139,142 ---- *************** *** 143,164 **** return PyWinLong_FromHANDLE(pO->m_overlapped.hEvent); } ! // @prop object|object|Any python object that you want to attach to your overlapped I/O request. ! else if (strcmp("object", name) == 0) ! { PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! ! if (pO->m_overlapped.obState) ! { ! Py_INCREF(pO->m_overlapped.obState); ! return pO->m_overlapped.obState; ! } ! Py_INCREF(Py_None); ! return Py_None; } ! // @prop int|dword|An integer buffer that may be used by overlapped functions (eg, <om win32file.WaitCommEvent>) ! else if (strcmp("dword", name) == 0) ! { PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! return PyInt_FromLong(pO->m_overlapped.dwValue); } return PyMember_Get((char *)self, memberlist, name); --- 147,157 ---- return PyWinLong_FromHANDLE(pO->m_overlapped.hEvent); } ! if (strcmp("Internal", name) == 0){ PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! return PyWinObject_FromULONG_PTR(pO->m_overlapped.Internal); } ! if (strcmp("InternalHigh", name) == 0){ PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! return PyWinObject_FromULONG_PTR(pO->m_overlapped.InternalHigh); } return PyMember_Get((char *)self, memberlist, name); *************** *** 187,205 **** return 0; } ! else if (strcmp("object", name) == 0) ! { PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! Py_XDECREF(pO->m_overlapped.obState); ! Py_INCREF(v); ! pO->m_overlapped.obState = v; return 0; } ! else if (strcmp("dword", name) == 0) ! { PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! DWORD dwordtmp=PyInt_AsLong(v); ! if ((dwordtmp==(DWORD)-1) && PyErr_Occurred()) return -1; ! pO->m_overlapped.dwValue=dwordtmp; return 0; } --- 180,197 ---- return 0; } ! if (strcmp("Internal", name)==0){ PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! ULONG_PTR ul_tmp; ! if (!PyWinLong_AsULONG_PTR(v, &ul_tmp)) ! return -1; ! pO->m_overlapped.Internal=ul_tmp; return 0; } ! if (strcmp("InternalHigh", name)==0){ PyOVERLAPPED *pO = (PyOVERLAPPED *)self; ! ULONG_PTR ul_tmp; ! if (!PyWinLong_AsULONG_PTR(v, &ul_tmp)) return -1; ! pO->m_overlapped.InternalHigh=ul_tmp; return 0; } |
From: Mark H. <mha...@us...> - 2008-05-24 08:18:21
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10142 Modified Files: make.bat Log Message: Make it usually magically work on amd64 archs. Index: make.bat =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/make.bat,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** make.bat 17 Apr 2002 14:06:19 -0000 1.5 --- make.bat 24 May 2008 08:18:27 -0000 1.6 *************** *** 6,9 **** --- 6,11 ---- if exist "\Program files\HTML Help Workshop\hhc.exe" set HHC="\Program files\HTML Help Workshop\hhc.exe" & goto doit if exist "C:\Program files\HTML Help Workshop\hhc.exe" set HHC="C:\Program files\HTML Help Workshop\hhc.exe" & goto doit + if exist "\Program files (x86)\HTML Help Workshop\hhc.exe" set HHC="\Program files (x86)\HTML Help Workshop\hhc.exe" & goto doit + if exist "C:\Program files (x86)\HTML Help Workshop\hhc.exe" set HHC="C:\Program files (x86)\HTML Help Workshop\hhc.exe" & goto doit echo Can not locate HHC.EXE - please set the HHC environment to point to the .exe |
From: Mark H. <mha...@us...> - 2008-05-24 08:17:48
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9786 Modified Files: pywin32.mak pywin32-document.xml Log Message: Fix reference to CHANGES.txt Index: pywin32-document.xml =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32-document.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pywin32-document.xml 4 May 2008 10:51:02 -0000 1.6 --- pywin32-document.xml 24 May 2008 08:17:54 -0000 1.7 *************** *** 1,5 **** <document> <important> ! <item name="View the change log" href="CHANGES.txt"/> </important> <links> --- 1,5 ---- <document> <important> ! <item name="View the change log" href="html/CHANGES.txt"/> </important> <links> Index: pywin32.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32.mak,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pywin32.mak 4 May 2008 10:51:02 -0000 1.19 --- pywin32.mak 24 May 2008 08:17:54 -0000 1.20 *************** *** 31,35 **** $(ISAPI_DIR)/doc/*.html \ $(PYTHONWIN_DIR)/readme.html $(PYTHONWIN_DIR)/doc/* $(PYTHONWIN_DIR)/doc/debugger/* \ ! CHANGES.txt \ --- 31,35 ---- $(ISAPI_DIR)/doc/*.html \ $(PYTHONWIN_DIR)/readme.html $(PYTHONWIN_DIR)/doc/* $(PYTHONWIN_DIR)/doc/debugger/* \ ! ../CHANGES.txt \ |
From: Mark H. <mha...@us...> - 2008-05-24 08:02:36
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4295 Modified Files: MANIFEST.in Log Message: Remove ref to pywin32_preinstall.py Index: MANIFEST.in =================================================================== RCS file: /cvsroot/pywin32/pywin32/MANIFEST.in,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MANIFEST.in 12 Feb 2008 12:55:31 -0000 1.13 --- MANIFEST.in 24 May 2008 08:02:41 -0000 1.14 *************** *** 11,15 **** include setup.py include pywin32_postinstall.py - include pywin32_preinstall.py # don't know how to include "Python and Extensions.dsw" - spaces upset things # Core win32 stuff --- 11,14 ---- |
From: Mark H. <mha...@us...> - 2008-05-24 07:20:53
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22843 Modified Files: setup.py pywin32_postinstall.py Log Message: Arrange for MFC71.dll or MFC90.dll to be installed if the version says so Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** pywin32_postinstall.py 24 May 2008 00:33:16 -0000 1.23 --- pywin32_postinstall.py 24 May 2008 07:20:58 -0000 1.24 *************** *** 424,428 **** mfc_dll = "mfc90.dll" try: ! win32api.SearchPath(None, mfc_dll) except win32api.error: print "*" * 20, "WARNING", "*" * 20 --- 424,430 ---- mfc_dll = "mfc90.dll" try: ! # It might be next to pythonwin itself. ! if not os.path.isfile(os.path.join(lib_dir, "pythonwin", mfc_dll): ! win32api.SearchPath(None, mfc_dll) except win32api.error: print "*" * 20, "WARNING", "*" * 20 Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** setup.py 19 May 2008 13:49:13 -0000 1.71 --- setup.py 24 May 2008 07:20:58 -0000 1.72 *************** *** 17,21 **** all extension modules - note that using the Vista SDK doesn't force you to use Vista as your build environment. Please use google to find the SDK - ! links to microsoft.com seem to only stay current for a short time. Early versions of certain Windows headers/SDK versions will also cause --- 17,24 ---- all extension modules - note that using the Vista SDK doesn't force you to use Vista as your build environment. Please use google to find the SDK - ! links to microsoft.com seem to only stay current for a short time. Also note ! that the SDK that comes with VS2008 is not good enough to compile earlier ! versions. If you installed VS2008 after the Vista SDK, try doing a 'repair' ! on your SDK install. Early versions of certain Windows headers/SDK versions will also cause *************** *** 773,776 **** --- 776,818 ---- self.copy_file( os.path.join(self.build_temp, fname), target_dir) + # The MFC DLLs. + try: + target_dir = os.path.join(self.build_lib, "pythonwin") + if sys.hexversion < 0x2040000: + pass # don't do anything for these early versions. + elif sys.hexversion < 0x2060000: + # hrm - there doesn't seem to be a 'redist' directory for this + # compiler (even the installation CDs only seem to have the MFC + # DLLs in the "win\system" directory - just grab it from + # system32 (but we can't even use win32api for that!) + src = os.path.join(os.environ.get('SystemRoot'), 'System32', 'mfc71.dll') + if not os.path.isfile(src): + raise RuntimeError, "Can't find %r" % (src,) + self.copy_file(src, target_dir) + else: + # On a 64bit host, the value we are looking for is actually in + # SysWow64Node - but that is only available on xp and later. + access = _winreg.KEY_READ + if sys.getwindowsversion()[0] >= 5: + access = access | 512 # KEY_WOW64_32KEY + if self.plat_name == 'win-amd64': + plat_dir = "amd64" + else: + plat_dir = "x86" + # Find the redist directory. + vckey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, + r"SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC", + access) + val, val_typ = _winreg.QueryValueEx(vckey, "ProductDir") + mfc_dir = os.path.join(val, "redist", plat_dir, "Microsoft.VC90.MFC") + if not os.path.isdir(mfc_dir): + raise RuntimeError, "Can't find the redist dir at %r" % (mfc_dir) + files = "mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll Microsoft.VC90.MFC.manifest".split() + for f in files: + self.copy_file( + os.path.join(mfc_dir, f), target_dir) + except (EnvironmentError, RuntimeError), exc: + print "Can't find an installed VC for the MFC DLLs:", exc + def build_exefile(self, ext): |
From: Mark H. <mha...@us...> - 2008-05-24 03:29:54
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32425 Modified Files: CHANGES.txt Log Message: A few more changes Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CHANGES.txt 4 May 2008 10:45:51 -0000 1.19 --- CHANGES.txt 24 May 2008 03:30:00 -0000 1.20 *************** *** 18,25 **** and maintenance of the package are by Vernon Cole. ! * Available for AMD64 versions of Windows. Note that this requires the ! x86-64 version of Python 2.5.2, which was not yet available as build 211 ! was released, but was expected shortly. Lots of help from Roger, Steve Yin, ! and Sidnei da Silva. * com related changes: --- 18,24 ---- and maintenance of the package are by Vernon Cole. ! * Available for AMD64 versions of Windows for Python 2.6 and later (support ! for Python 2.5 is just too hard, sorry). Lots of help from Roger, ! Steve Yin and Sidnei da Silva. * com related changes: *************** *** 149,152 **** --- 148,154 ---- - Background pychecker plugin by kxroberto - Fix COM browser + - Problems calling SetWindowPost on an ActiveX control. + - Upgrade to scintilla 1.75 + - Fix problems locating the Python DLL at startup. * isapi: |
From: Mark H. <mha...@us...> - 2008-05-24 02:55:30
|
Update of /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19630/TestSources/PyCOMTest Modified Files: PyCOMTest.idl Log Message: Fix [ 1960311 ] 'None' returned for COM string constants Index: PyCOMTest.idl =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMTest.idl,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PyCOMTest.idl 8 Apr 2008 11:51:26 -0000 1.17 --- PyCOMTest.idl 24 May 2008 02:55:34 -0000 1.18 *************** *** 70,73 **** --- 70,74 ---- const unsigned char UCharTest = 255; const char CharTest = -1; + const LPWSTR StringTest = L"Hello Loraine"; }; |
From: Mark H. <mha...@us...> - 2008-05-24 02:55:30
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19630/win32com/src/extensions Modified Files: PyVARDESC.cpp Log Message: Fix [ 1960311 ] 'None' returned for COM string constants Index: PyVARDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyVARDESC.cpp 18 May 2008 13:43:06 -0000 1.4 --- PyVARDESC.cpp 24 May 2008 02:55:34 -0000 1.5 *************** *** 152,164 **** // Cast the variant type here to the correct value for this constant // so that the correct Python type will be created below. ! // ! // I am not sure why is there a difference between the variant data ! // passed in from the type library and the exported type... ! VariantInit(&varValue); ! VariantChangeType(&varValue, pVD->lpvarValue, 0, pVD->elemdescVar.tdesc.vt); ! value = PyCom_PyObjectFromVariant(&varValue); ! VariantClear(&varValue); } else { PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind); --- 152,179 ---- // Cast the variant type here to the correct value for this constant // so that the correct Python type will be created below. ! // The problem seems to exist for unsigned types (the variant has ! // a signed type, but the typelib has an unsigned one). However, ! // doing this unconditionally has side-effects, as the typelib ! // has VT_LPWSTR for the type of strings - and VariantChangeType ! // returns a VT_EMPTY variant in that case. ! // So we only perform this conversion for types known to be a problem: ! switch (pVD->elemdescVar.tdesc.vt) { ! case VT_UI1: ! case VT_UI2: ! case VT_UI4: ! case VT_UI8: ! case VT_UINT: ! case VT_UINT_PTR: ! VariantInit(&varValue); ! VariantChangeType(&varValue, pVD->lpvarValue, 0, pVD->elemdescVar.tdesc.vt); ! value = PyCom_PyObjectFromVariant(&varValue); ! VariantClear(&varValue); ! break; ! default: ! value = PyCom_PyObjectFromVariant(pVD->lpvarValue); ! break; ! } } else { PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind); |
From: Mark H. <mha...@us...> - 2008-05-24 02:55:30
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19630/win32com/client Modified Files: genpy.py Log Message: Fix [ 1960311 ] 'None' returned for COM string constants Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** genpy.py 24 May 2007 13:01:48 -0000 1.53 --- genpy.py 24 May 2008 02:55:34 -0000 1.54 *************** *** 24,28 **** error = "makepy.error" ! makepy_version = "0.4.96" # Written to generated file. GEN_FULL="full" --- 24,28 ---- error = "makepy.error" ! makepy_version = "0.4.97" # Written to generated file. GEN_FULL="full" |
From: Mark H. <mha...@us...> - 2008-05-24 02:55:30
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19630/win32com/test Modified Files: testPyComTest.py Log Message: Fix [ 1960311 ] 'None' returned for COM string constants Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** testPyComTest.py 8 Apr 2008 11:51:26 -0000 1.30 --- testPyComTest.py 24 May 2008 02:55:34 -0000 1.31 *************** *** 56,60 **** raise error, "Constant %s missing" % (constName,) if comConst != pyConst: ! raise error, "Constant value wrong for %s - got %d, wanted %d" % (constName, comConst, pyConst) # Simple handler class. This demo only fires one event. --- 56,60 ---- raise error, "Constant %s missing" % (constName,) if comConst != pyConst: ! raise error, "Constant value wrong for %s - got %s, wanted %s" % (constName, comConst, pyConst) # Simple handler class. This demo only fires one event. *************** *** 277,280 **** --- 277,281 ---- TestConstant("UCharTest", 255) TestConstant("CharTest", -1) + TestConstant("StringTest", "Hello Loraine") now = pythoncom.MakeTime(time.gmtime(time.time())) |
From: Mark H. <mha...@us...> - 2008-05-24 00:33:11
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30958 Modified Files: pywin32_postinstall.py Log Message: Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** pywin32_postinstall.py 23 May 2008 23:56:35 -0000 1.22 --- pywin32_postinstall.py 24 May 2008 00:33:16 -0000 1.23 *************** *** 243,246 **** --- 243,263 ---- return os.path.join(fldr, install_group) + # Get the system directory, which may be the Wow64 directory if we are a 32bit + # python on a 64bit OS. + def get_system_dir(): + import win32api # we assume this exists. + try: + import pythoncom + import win32process + from win32com.shell import shell, shellcon + try: + if win32process.IsWow64Process(): + return shell.SHGetSpecialFolderPath(0,shellcon.CSIDL_SYSTEMX86) + return shell.SHGetSpecialFolderPath(0,shellcon.CSIDL_SYSTEM) + except (pythoncom.com_error, win32process.error): + return win32api.GetSystemDirectory().encode('mbcs') + except ImportError: + return win32api.GetSystemDirectory().encode('mbcs') + def install(): import distutils.sysconfig *************** *** 279,283 **** # Try the system32 directory first - if that fails due to "access denied", # it implies a non-admin user, and we use sys.prefix ! for dest_dir in [win32api.GetSystemDirectory(), sys.prefix]: # and copy some files over there worked = 0 --- 296,300 ---- # Try the system32 directory first - if that fails due to "access denied", # it implies a non-admin user, and we use sys.prefix ! for dest_dir in [get_system_dir(), sys.prefix]: # and copy some files over there worked = 0 *************** *** 478,483 **** # it implies a non-admin user, and we use sys.prefix try: ! import win32api ! for dest_dir in [win32api.GetSystemDirectory(), sys.prefix]: # and copy some files over there worked = 0 --- 495,499 ---- # it implies a non-admin user, and we use sys.prefix try: ! for dest_dir in [get_system_dir(), sys.prefix]: # and copy some files over there worked = 0 |
From: Mark H. <mha...@us...> - 2008-05-24 00:29:48
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30538 Modified Files: win32process.i Log Message: Allow IsWow64Process to accept None, the new default, to mean current proc Index: win32process.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** win32process.i 10 Apr 2008 02:09:43 -0000 1.32 --- win32process.i 24 May 2008 00:29:55 -0000 1.33 *************** *** 1510,1521 **** if (pfnIsWow64Process==NULL) return PyBool_FromLong(FALSE); ! PyObject *obhprocess; HANDLE hprocess; ! // @pyparm <o PyHANDLE>|Process||Handle to a process as returned by ! // <om win32api.OpenProcess>, <om win32api.GetCurrentProcess>, etc ! if (!PyArg_ParseTuple(args, "O:IsWow64Process", &obhprocess)) return NULL; BOOL ret; ! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess)) return NULL; BOOL ok = (*pfnIsWow64Process)(hprocess, &ret); --- 1510,1524 ---- if (pfnIsWow64Process==NULL) return PyBool_FromLong(FALSE); ! PyObject *obhprocess = Py_None; HANDLE hprocess; ! // @pyparm <o PyHANDLE>|Process|None|Handle to a process as returned by ! // <om win32api.OpenProcess>, <om win32api.GetCurrentProcess>, etc, or ! // will use the current process handle if None (the default) is passed. ! if (!PyArg_ParseTuple(args, "|O:IsWow64Process", &obhprocess)) return NULL; BOOL ret; ! if (obhprocess == Py_None) ! hprocess = ::GetCurrentProcess(); ! else if (!PyWinObject_AsHANDLE(obhprocess, &hprocess)) return NULL; BOOL ok = (*pfnIsWow64Process)(hprocess, &ret); |
From: Mark H. <mha...@us...> - 2008-05-23 23:56:31
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18351 Modified Files: pywin32_postinstall.py Log Message: pywin32 for Python 2.6 depends on mfc90.dll Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** pywin32_postinstall.py 11 Apr 2008 00:12:12 -0000 1.21 --- pywin32_postinstall.py 23 May 2008 23:56:35 -0000 1.22 *************** *** 402,407 **** if sys.hexversion < 0x2040000: mfc_dll = "mfc42.dll" ! else: mfc_dll = "mfc71.dll" try: win32api.SearchPath(None, mfc_dll) --- 402,409 ---- if sys.hexversion < 0x2040000: mfc_dll = "mfc42.dll" ! elif sys.hexversion < 0x2060000: mfc_dll = "mfc71.dll" + else: + mfc_dll = "mfc90.dll" try: win32api.SearchPath(None, mfc_dll) |
From: Mark H. <mha...@us...> - 2008-05-19 13:55:04
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18456/pywin/framework Modified Files: help.py Log Message: If there is only 1 help file registered, don't bother asking which one! Index: help.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/help.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** help.py 2 Dec 2005 07:54:35 -0000 1.10 --- help.py 19 May 2008 13:55:01 -0000 1.11 *************** *** 99,103 **** from pywin.dialogs import list helpFiles = ListAllHelpFiles() ! index = list.SelectFromLists("Select Help file", helpFiles, ["Title"]) if index is not None: OpenHelpFile(helpFiles[index][1]) --- 99,107 ---- from pywin.dialogs import list helpFiles = ListAllHelpFiles() ! if len(helpFiles)==1: ! # only 1 help file registered - probably ours - no point asking ! index = 0 ! else: ! index = list.SelectFromLists("Select Help file", helpFiles, ["Title"]) if index is not None: OpenHelpFile(helpFiles[index][1]) |
From: Mark H. <mha...@us...> - 2008-05-19 13:49:20
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16041 Modified Files: setup.py Log Message: Only attempt to 'fixup' the sdk dirs if we found an SDK! Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** setup.py 11 Apr 2008 00:32:08 -0000 1.70 --- setup.py 19 May 2008 13:49:13 -0000 1.71 *************** *** 728,732 **** self.compiler.initialize() ! self._fixup_sdk_dirs() # Here we hack a "pywin32" directory (one of 'win32', 'win32com', --- 728,733 ---- self.compiler.initialize() ! if sdk_dir: ! self._fixup_sdk_dirs() # Here we hack a "pywin32" directory (one of 'win32', 'win32com', |
From: Mark H. <mha...@us...> - 2008-05-19 13:30:36
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8907/lib Modified Files: regcheck.py Log Message: Fix deprecation warning Index: regcheck.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regcheck.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** regcheck.py 19 Sep 2006 00:37:27 -0000 1.5 --- regcheck.py 19 May 2008 13:30:38 -0000 1.6 *************** *** 4,8 **** import warnings warnings.warn("The regcheck module has been pending deprecation since build 210", ! category=warnings.PendingDeprecationWarning) import win32con --- 4,8 ---- import warnings warnings.warn("The regcheck module has been pending deprecation since build 210", ! category=PendingDeprecationWarning) import win32con |
From: Mark H. <mha...@us...> - 2008-05-18 13:43:01
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14938/win32com/src/extensions Modified Files: PyVARDESC.cpp Log Message: Generate warning when we see an unknown VARDESC type and return None Index: PyVARDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyVARDESC.cpp 24 May 2007 06:01:04 -0000 1.3 --- PyVARDESC.cpp 18 May 2008 13:43:06 -0000 1.4 *************** *** 57,60 **** --- 57,63 ---- v->lpvarValue = pVar; } + else { + PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind); + } // else ignore value. return TRUE; *************** *** 142,148 **** varkind = pVD->varkind; ! if (pVD->varkind == VAR_PERINSTANCE) value = PyInt_FromLong(pVD->oInst); ! else if (pVD->varkind == VAR_CONST) { VARIANT varValue; --- 145,151 ---- varkind = pVD->varkind; ! if (varkind == VAR_PERINSTANCE) value = PyInt_FromLong(pVD->oInst); ! else if (varkind == VAR_CONST) { VARIANT varValue; *************** *** 159,162 **** --- 162,166 ---- VariantClear(&varValue); } else { + PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind); value = Py_None; Py_INCREF(Py_None); |
From: Mark H. <mha...@us...> - 2008-05-17 04:07:05
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8942 Modified Files: Win32uiHostGlue.h Log Message: Rationalize/modernize the way we try and load win32ui and python, and update so it works from a PC build dir on x86 and amd64 Index: Win32uiHostGlue.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Win32uiHostGlue.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Win32uiHostGlue.h 3 Jun 2007 12:35:57 -0000 1.10 --- Win32uiHostGlue.h 17 May 2008 04:07:11 -0000 1.11 *************** *** 115,124 **** #endif // god damn - this all should die. ! // The problem is finding the correct Python. ! // If we can get win32ui loaded, we can get the version from that. ! // Otherwise, we can try and find a Python.dll in the current directory. // Otherwise we give up in disgust. - // (A brutal search trying a LoadLibrary on *all* Pythons we find is very - // unlikely to come up with the right one. char app_dir[MAX_PATH]; strcpy(app_dir, "\0"); --- 115,124 ---- #endif // god damn - this all should die. ! // The problem is finding the correct win32ui.pyd and the correct ! // Python. ! // If we can get win32ui loaded, we can get Python from that. ! // Otherwise, we can try and find a Python.dll in various directories, ! // then try again. // Otherwise we give up in disgust. char app_dir[MAX_PATH]; strcpy(app_dir, "\0"); *************** *** 132,183 **** HMODULE hModCore = NULL; ! int i; HMODULE hModWin32ui = LoadLibrary(szWinui_Name); if (hModWin32ui==NULL) { ! // try an installed version wsprintf(fname, "%s\\%s\\%s", app_dir, "lib\\site-packages\\pythonwin", szWinui_Name); hModWin32ui = LoadLibrary(fname); } if (hModWin32ui==NULL) { ! // Still no need to give up - try a local Python. ! for (i=15;i<40;i++) { ! #ifdef _DEBUG ! wsprintf(fname, "%s\\Python%d_d.dll", app_dir, i); ! #else ! wsprintf(fname, "%s\\Python%d.dll", app_dir, i); ! #endif hModCore = LoadLibrary(fname); - if (hModCore) - break; } ! if (!hModCore) { ! // No Python, no win32ui :( ! char buf[256]; ! sprintf(buf,"The application can not locate %s (or Python) (%d)\n", szWinui_Name, GetLastError()); ! Py_ssize_t len = strlen(buf); ! Py_ssize_t bufLeft = sizeof(buf) - len; ! FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), ! MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL), ! buf+len, PyWin_SAFE_DOWNCAST(bufLeft, Py_ssize_t, DWORD), ! NULL); ! AfxMessageBox(buf); ! return FALSE; } } if (!hModCore) { ! for (i=15;i<40;i++) { ! char fname[20]; ! #ifdef _DEBUG ! wsprintf(fname, "Python%d_d.dll", i); ! #else ! wsprintf(fname, "Python%d.dll", i); ! #endif ! hModCore = GetModuleHandle(fname); ! if (hModCore) ! break; ! } ! } ! if (hModCore==NULL) { ! AfxMessageBox("Can not locate the Python DLL"); return FALSE; } --- 132,197 ---- HMODULE hModCore = NULL; ! // There are 2 cases we care about: ! // * pythonwin.exe next to win32ui, in lib\site-packages\pythonwin ! // * pythonwin.exe next to python.exe, in sys.home - this is for ! // older style installs and for custom layouts. ! // * a kind-of sub-case - handle the PCBuild directory ! char *py_dll_candidates[] = { ! "..\\..\\..", // lib\site-packages\pythonwin ! #ifdef _M_X64 ! "..\\..\\..\\PCBuild\\amd64", ! #else ! "..\\..\\..\\PCBuild", ! #endif ! // and relative to the root of the py dir. ! "", ! #ifdef _M_X64 ! "PCBuild\\amd64", ! #else ! "PCBuild", ! #endif ! }; ! char py_dll[20]; ! #ifdef _DEBUG ! wsprintf(py_dll, "Python%d%d_d.dll", PY_MAJOR_VERSION, PY_MINOR_VERSION); ! #else ! wsprintf(py_dll, "Python%d%d.dll", PY_MAJOR_VERSION, PY_MINOR_VERSION); ! #endif ! // try it simple - if we can load the module we are done. HMODULE hModWin32ui = LoadLibrary(szWinui_Name); if (hModWin32ui==NULL) { ! // try an installed version (old versions installed pythonwin.exe next ! // to python.exe - but we shouldn't get here if pythonwin.exe is next ! // to win32ui) wsprintf(fname, "%s\\%s\\%s", app_dir, "lib\\site-packages\\pythonwin", szWinui_Name); hModWin32ui = LoadLibrary(fname); } if (hModWin32ui==NULL) { ! // 2 main reasons we get here: can't load MFC, or can't load ! // Python itself. We try and handle the latter now... ! int i; ! const int ncandidates = sizeof(py_dll_candidates)/sizeof(py_dll_candidates[0]); ! for (i=0;i<ncandidates && hModCore==0;i++) { ! wsprintf(fname, "%s\\%s\\%s", app_dir, py_dll_candidates[i], py_dll); hModCore = LoadLibrary(fname); } ! if (hModCore) { ! hModWin32ui = LoadLibrary(szWinui_Name); } + } else { + hModCore = GetModuleHandle(py_dll); + ASSERT(hModCore); // loaded win32ui, how can I not have a handle to python? } if (!hModCore) { ! // No Python, no win32ui :( ! char buf[256]; ! sprintf(buf,"The application can not locate %s (or Python) (%d)\n", szWinui_Name, GetLastError()); ! Py_ssize_t len = strlen(buf); ! Py_ssize_t bufLeft = sizeof(buf) - len; ! FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), ! MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL), ! buf+len, PyWin_SAFE_DOWNCAST(bufLeft, Py_ssize_t, DWORD), ! NULL); ! AfxMessageBox(buf); return FALSE; } |
From: Mark H. <mha...@us...> - 2008-05-17 04:06:09
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8551 Modified Files: win32ui.h Log Message: Only use an MFC8 manifest if we are using MFC8 (vs2008 makes it unnecessary for MFC9) Index: win32ui.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ui.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32ui.h 5 Jul 2007 05:31:39 -0000 1.6 --- win32ui.h 17 May 2008 04:06:14 -0000 1.7 *************** *** 29,33 **** // For MFC8 (VS2005), we need to nominate the MFC assembly - may as well do // it here so its done once for all projects! ! #if _MFC_VER >= 0x0800 # pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='*' publicKeyToken='fc8b3b9a1e18e3b' language='*'\"") #endif --- 29,34 ---- // For MFC8 (VS2005), we need to nominate the MFC assembly - may as well do // it here so its done once for all projects! ! // BUT - this isn't needed any more for MFC9/VS2008 ! #if _MFC_VER >= 0x0800 && _MFC_VER < 0x0900 # pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='*' publicKeyToken='fc8b3b9a1e18e3b' language='*'\"") #endif |