pywin32-checkins Mailing List for Python for Windows Extensions (Page 74)
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-07-25 01:10:04
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11670 Modified Files: win32apimodule.cpp Log Message: Fix GetConsoleTitle to match the documented and observed behaviour when growing the buffer. Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** win32apimodule.cpp 30 Jun 2008 12:56:47 -0000 1.87 --- win32apimodule.cpp 25 Jul 2008 01:10:10 -0000 1.88 *************** *** 882,892 **** { TCHAR *title=NULL; ! DWORD chars_allocated=64, chars_returned; PyObject *ret=NULL; if (!PyArg_ParseTuple(args, ":GetConsoleTitle")) return NULL; ! // if buffer is too small, function still copies as much of title as will fit, ! // so loop until fewer characters returned than were allocated while (TRUE){ if (title!=NULL){ --- 882,896 ---- { TCHAR *title=NULL; ! DWORD chars_allocated=1024, chars_returned; PyObject *ret=NULL; if (!PyArg_ParseTuple(args, ":GetConsoleTitle")) return NULL; ! // We used to rely on that if buffer is too small, function still copies ! // as much of title as will fit, so loop until fewer characters returned ! // than were allocated. ! // Latest MSDN now says "If the buffer is not large enough to store ! // the title, the return value is zero and GetLastError returns ! // ERROR_SUCCESS." while (TRUE){ if (title!=NULL){ *************** *** 898,905 **** return PyErr_Format(PyExc_MemoryError, "GetConsoleTitle: unable to allocate %d bytes", chars_allocated*sizeof(TCHAR)); chars_returned=GetConsoleTitle(title, chars_allocated); ! if (chars_returned==0){ PyWin_SetAPIError("GetConsoleTitle"); break; ! } if ((chars_returned+1)<chars_allocated){ // returned length does *not* includes the NULL terminator ret=PyWinObject_FromTCHAR(title); --- 902,909 ---- return PyErr_Format(PyExc_MemoryError, "GetConsoleTitle: unable to allocate %d bytes", chars_allocated*sizeof(TCHAR)); chars_returned=GetConsoleTitle(title, chars_allocated); ! if (chars_returned==0 && GetLastError() != ERROR_SUCCESS){ PyWin_SetAPIError("GetConsoleTitle"); break; ! } if ((chars_returned+1)<chars_allocated){ // returned length does *not* includes the NULL terminator ret=PyWinObject_FromTCHAR(title); |
From: Mark H. <mha...@us...> - 2008-07-24 23:22:52
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3884 Modified Files: setup.py Log Message: Add IExplorerPaneVisibility and a few related constants. Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** setup.py 31 May 2008 07:19:06 -0000 1.75 --- setup.py 24 Jul 2008 23:22:56 -0000 1.76 *************** *** 1518,1521 **** --- 1518,1522 ---- %(shell)s/PyIExplorerCommand.cpp %(shell)s/PyIExplorerCommandProvider.cpp + %(shell)s/PyIExplorerPaneVisibility.cpp %(shell)s/PyIExtractIcon.cpp %(shell)s/PyIExtractIconW.cpp |
From: Mark H. <mha...@us...> - 2008-07-24 23:22:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3884/com/win32comext/shell/src Modified Files: shell.cpp Added Files: PyIExplorerPaneVisibility.cpp PyIExplorerPaneVisibility.h Log Message: Add IExplorerPaneVisibility and a few related constants. --- NEW FILE: PyIExplorerPaneVisibility.cpp --- // This file implements the IExplorerPaneVisibility Interface and Gateway for Python. #include "shell_pch.h" #include "PyIExplorerPaneVisibility.h" // @doc - This file contains autoduck documentation // --------------------------------------------------- // // Interface Implementation PyIExplorerPaneVisibility::PyIExplorerPaneVisibility(IUnknown *pdisp): PyIUnknown(pdisp) { ob_type = &type; } PyIExplorerPaneVisibility::~PyIExplorerPaneVisibility() { } /* static */ IExplorerPaneVisibility *PyIExplorerPaneVisibility::GetI(PyObject *self) { return (IExplorerPaneVisibility *)PyIUnknown::GetI(self); } // @pymethod int|PyIExplorerPaneVisibility|GetPaneState|Description of Extract. PyObject *PyIExplorerPaneVisibility::GetPaneState(PyObject *self, PyObject *args) { IExplorerPaneVisibility *pIEI = GetI(self); if ( pIEI == NULL ) return NULL; // @pyparm guid|ep||Description for ep PyObject *obep; if ( !PyArg_ParseTuple(args, "O:GetPaneState", &obep) ) return NULL; IID ep; if (!PyWinObject_AsIID(obep, &ep)) return NULL; HRESULT hr; unsigned long state; PY_INTERFACE_PRECALL; hr = pIEI->GetPaneState( ep, &state); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEI, IID_IExplorerPaneVisibility ); return PyLong_FromUnsignedLong(state); } // @object PyIExplorerPaneVisibility|Description of the interface static struct PyMethodDef PyIExplorerPaneVisibility_methods[] = { { "GetPaneState", PyIExplorerPaneVisibility::GetPaneState, 1 }, // @pymeth Extract|Description of Extract { NULL } }; PyComTypeObject PyIExplorerPaneVisibility::type("PyIExplorerPaneVisibility", &PyIUnknown::type, sizeof(PyIExplorerPaneVisibility), PyIExplorerPaneVisibility_methods, GET_PYCOM_CTOR(PyIExplorerPaneVisibility)); --- NEW FILE: PyIExplorerPaneVisibility.h --- // This file declares the IExplorerPaneVisibility Interface and Gateway for Python. // Generated by makegw.py // --------------------------------------------------- // // Interface Declaration class PyIExplorerPaneVisibility : public PyIUnknown { public: MAKE_PYCOM_CTOR(PyIExplorerPaneVisibility); static IExplorerPaneVisibility *GetI(PyObject *self); static PyComTypeObject type; // The Python methods static PyObject *GetPaneState(PyObject *self, PyObject *args); protected: PyIExplorerPaneVisibility(IUnknown *pdisp); ~PyIExplorerPaneVisibility(); }; Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** shell.cpp 11 Feb 2008 00:28:33 -0000 1.63 --- shell.cpp 24 Jul 2008 23:22:56 -0000 1.64 *************** *** 57,60 **** --- 57,61 ---- #include "PyIExplorerCommand.h" #include "PyIExplorerCommandProvider.h" + #include "PyIExplorerPaneVisibility.h" #include "PyIShellItem.h" #include "PyIShellItemArray.h" *************** *** 2957,2960 **** --- 2958,2962 ---- PYCOM_INTERFACE_FULL(ExplorerCommand), PYCOM_INTERFACE_SERVER_ONLY(ExplorerCommandProvider), + PYCOM_INTERFACE_CLIENT_ONLY(ExplorerPaneVisibility), // IID_ICopyHook doesn't exist - hack it up { &IID_IShellCopyHook, "IShellCopyHook", "IID_IShellCopyHook", &PyICopyHook::type, GET_PYGATEWAY_CTOR(PyGCopyHook) }, *************** *** 3094,3097 **** --- 3096,3101 ---- ADD_IID(CGID_ShellServiceObject); ADD_IID(CGID_ExplorerBarDoc); + ADD_IID(CGID_ShellServiceObject); + ADD_IID(CGID_ExplorerBarDoc); ADD_IID(SID_SShellDesktop); ADD_IID(SID_SUrlHistory); *************** *** 3121,3124 **** --- 3125,3137 ---- ADD_IID(FMTID_ImageSummaryInformation); ADD_IID(IID_CDefView); + + ADD_IID(EP_NavPane); + ADD_IID(EP_Commands); + ADD_IID(EP_Commands_Organize); + ADD_IID(EP_Commands_View); + ADD_IID(EP_DetailsPane); + ADD_IID(EP_PreviewPane); + ADD_IID(EP_QueryPane); + ADD_IID(EP_AdvQueryPane); #else # pragma message("Please update your SDK headers - IE5 features missing!") |
From: Mark H. <mha...@us...> - 2008-07-24 23:21:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3504 Modified Files: PyIExplorerBrowser.cpp Log Message: Fix IExplorerBrowser::GetOptions() arg handling. Index: PyIExplorerBrowser.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExplorerBrowser.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIExplorerBrowser.cpp 8 Feb 2008 03:06:28 -0000 1.2 --- PyIExplorerBrowser.cpp 24 Jul 2008 23:21:56 -0000 1.3 *************** *** 271,289 **** return NULL; EXPLORER_BROWSER_OPTIONS dwFlag; ! PyObject *obpdwFlag; ! // @pyparm <o PyEXPLORER_BROWSER_OPTIONS>|pdwFlag||Description for pdwFlag ! if ( !PyArg_ParseTuple(args, "O:GetOptions", &obpdwFlag) ) return NULL; - BOOL bPythonIsHappy = TRUE; - if (bPythonIsHappy && !PyObject_AsEXPLORER_BROWSER_OPTIONS( obpdwFlag, &dwFlag )) bPythonIsHappy = FALSE; - if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIEB->GetOptions( &dwFlag ); PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEB, IID_IExplorerBrowser ); ! return PyInt_FromLong(dwFlag); } --- 271,283 ---- return NULL; EXPLORER_BROWSER_OPTIONS dwFlag; ! if ( !PyArg_ParseTuple(args, ":GetOptions")) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIEB->GetOptions( &dwFlag ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEB, IID_IExplorerBrowser ); ! return PyLong_FromUnsignedLong(dwFlag); } |
From: Mark H. <mha...@us...> - 2008-07-20 03:16:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28897/win32com/src Modified Files: PythonCOM.cpp Log Message: Add pythoncom.ObjectFromAddress() and an example of how to use it. Index: PythonCOM.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** PythonCOM.cpp 19 Jul 2008 06:23:40 -0000 1.50 --- PythonCOM.cpp 20 Jul 2008 03:16:25 -0000 1.51 *************** *** 1436,1440 **** } - // @pymethod int|pythoncom|PumpWaitingMessages|Pumps all waiting messages for the current thread. // @comm It is sometimes necessary for a COM thread to have a message loop. This function --- 1436,1439 ---- *************** *** 1790,1796 **** --- 1789,1841 ---- return NULL; } + // docs for ObjectFromLresult don't mention reference counting, but + // it does say that you can't call this twice on the same object, and + // it has a signature that implies normal reference counting. So + // we assume this call has already added a reference to the result. return PyCom_PyObjectFromIUnknown((IUnknown *)ret, iid, FALSE); } + // @pymethod <o PyIUnknown>|pythoncom|ObjectFromAddress|Returns a COM object given its address in memory. + // @rdesc This method is useful for applications which return objects via non-standard + // mechanisms - eg, Windows Explorer allows you to send a specific message to the + // explorer window and the result will be the address of an object Explorer implements. + // This method allows you to recover the object from that address. + static PyObject *pythoncom_ObjectFromAddress(PyObject *self, PyObject *args) + { + IID iid = IID_IUnknown; + void *addr; + PyObject *obAddr; + PyObject *obIID = NULL; + // @pyparam int|address||The address which holds a COM object + // @pyparm <o PyIID>|iid|IUnknown|The IID to query + if (!PyArg_ParseTuple(args, "O|O", &obAddr, &obIID)) + return NULL; + if (!PyWinLong_AsVoidPtr(obAddr, &addr)) + return NULL; + if (obIID && !PyWinObject_AsIID(obIID, &iid)) + return NULL; + + HRESULT hr; + IUnknown *ret = 0; + PyThreadState *_save = PyEval_SaveThread(); + PYWINTYPES_TRY + { + hr = ((IUnknown *)addr)->QueryInterface(iid, (void **)&ret); + PyEval_RestoreThread(_save); + } + PYWINTYPES_EXCEPT + { + PyEval_RestoreThread(_save); + return PyErr_Format(PyExc_ValueError, "Address is not a valid COM object (win32 exception attempting to retrieve it!)"); + } + if (FAILED(hr) || ret==0) { + PyCom_BuildPyException(hr); + return NULL; + } + // We've added a reference via the QI above. + return PyCom_PyObjectFromIUnknown(ret, iid, FALSE); + } + + /* List of module functions */ // @module pythoncom|A module, encapsulating the OLE automation API *************** *** 1862,1866 **** { "new", pythoncom_new, 1 }, { "New", pythoncom_new, 1 }, // @pymeth New|Create a new instance of an OLE automation server. ! { "ObjectFromLresult", pythoncom_ObjectFromLresult, 1 }, // @pymeth ObjectFromLresult|Returns a COM object given its address in memory. { "OleInitialize", pythoncom_OleInitialize, 1}, // @pymeth OleInitialize| { "OleGetClipboard", pythoncom_OleGetClipboard, 1}, // @pymeth OleGetClipboard|Retrieves a data object that you can use to access the contents of the clipboard. --- 1907,1912 ---- { "new", pythoncom_new, 1 }, { "New", pythoncom_new, 1 }, // @pymeth New|Create a new instance of an OLE automation server. ! { "ObjectFromAddress", pythoncom_ObjectFromAddress, 1 }, // @pymeth ObjectFromAddress|Returns a COM object given its address in memory. ! { "ObjectFromLresult", pythoncom_ObjectFromLresult, 1 }, // @pymeth ObjectFromLresult|Retrieves a requested interface pointer for an object based on a previously generated object reference. { "OleInitialize", pythoncom_OleInitialize, 1}, // @pymeth OleInitialize| { "OleGetClipboard", pythoncom_OleGetClipboard, 1}, // @pymeth OleGetClipboard|Retrieves a data object that you can use to access the contents of the clipboard. |
From: Mark H. <mha...@us...> - 2008-07-20 03:16:17
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/demos/servers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28897/win32comext/shell/demos/servers Modified Files: shell_view.py Log Message: Add pythoncom.ObjectFromAddress() and an example of how to use it. Index: shell_view.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/demos/servers/shell_view.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** shell_view.py 7 Feb 2008 05:24:20 -0000 1.11 --- shell_view.py 20 Jul 2008 03:16:25 -0000 1.12 *************** *** 369,372 **** --- 369,382 ---- self._CreateChildWindow(prev) + # This isn't part of the sample, but the most convenient place to + # test/demonstrate how you can get an IShellBrowser from a HWND + # (but ONLY when you are in the same process as the IShellBrowser!) + # Obviously it is not necessary here - we already have the browser! + browser_ad = win32gui.SendMessage(self.hwnd_parent, win32con.WM_USER+7, 0, 0) + browser_ob = pythoncom.ObjectFromAddress(browser_ad, shell.IID_IShellBrowser) + assert browser==browser_ob + # and make a call on the object to prove it doesn't die :) + assert browser.QueryActiveShellView()==browser_ob.QueryActiveShellView() + def _CreateMainWindow(self, prev, settings, browser, rect): # Creates a parent window that hosts the view window. This window |
From: Mark H. <mha...@us...> - 2008-07-19 06:23:35
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/win32com/src Modified Files: PythonCOM.cpp Log Message: Add pythoncom.ObjectFromLresult() and a test using IE. Index: PythonCOM.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** PythonCOM.cpp 4 Sep 2007 10:53:29 -0000 1.49 --- PythonCOM.cpp 19 Jul 2008 06:23:40 -0000 1.50 *************** *** 15,18 **** --- 15,19 ---- #include "PythonCOMServer.h" #include "PyFactory.h" + #include "OleAcc.h" // for ObjectFromLresult proto... // keep a reference to pythoncom'm __dict__ so the COM currency format can be looked up dynamically *************** *** 91,94 **** --- 92,97 ---- ) = NULL; + // typedefs for the function pointers are in OleAcc.h + LPFNOBJECTFROMLRESULT pfnObjectFromLresult = NULL; BOOL PyCom_HasDCom() *************** *** 1745,1748 **** --- 1748,1795 ---- } + // @pymethod <o PyIUnknown>|pythoncom|ObjectFromLresult|Retrieves a requested + // interface pointer for an object based on a previously generated object reference. + static PyObject *pythoncom_ObjectFromLresult(PyObject *self, PyObject *args) + { + PyObject *oblresult; + PyObject *obIID = NULL; + PyObject *obwparam; + // @pyparam int|lresult|| + // @pyparm <o PyIID>|iid||The IID to query + // @pyparm int|wparm|| + LRESULT lresult; + WPARAM wparam; + IID iid; + if (!PyArg_ParseTuple(args, "OOO", &oblresult, &obIID, &obwparam)) + return NULL; + if (!PyWinLong_AsULONG_PTR(oblresult, (ULONG_PTR *)&lresult)) + return NULL; + if (!PyWinLong_AsULONG_PTR(obwparam, (ULONG_PTR *)&wparam)) + return NULL; + if (obIID && !PyWinObject_AsIID(obIID, &iid)) + return NULL; + + // GIL protects us from races here. + if (pfnObjectFromLresult==NULL) { + HMODULE hmod = LoadLibrary("oleacc.dll"); + if (hmod) + pfnObjectFromLresult = (LPFNOBJECTFROMLRESULT) + GetProcAddress(hmod, "ObjectFromLresult"); + } + if (pfnObjectFromLresult==NULL) + return PyErr_Format(PyExc_NotImplementedError, + "Not available on this platform"); + + HRESULT hr; + void *ret = 0; + Py_BEGIN_ALLOW_THREADS + hr = (*pfnObjectFromLresult)(lresult, iid, wparam, &ret); + Py_END_ALLOW_THREADS + if (FAILED(hr)) { + PyCom_BuildPyException(hr); + return NULL; + } + return PyCom_PyObjectFromIUnknown((IUnknown *)ret, iid, FALSE); + } /* List of module functions */ *************** *** 1815,1818 **** --- 1862,1866 ---- { "new", pythoncom_new, 1 }, { "New", pythoncom_new, 1 }, // @pymeth New|Create a new instance of an OLE automation server. + { "ObjectFromLresult", pythoncom_ObjectFromLresult, 1 }, // @pymeth ObjectFromLresult|Returns a COM object given its address in memory. { "OleInitialize", pythoncom_OleInitialize, 1}, // @pymeth OleInitialize| { "OleGetClipboard", pythoncom_OleGetClipboard, 1}, // @pymeth OleGetClipboard|Retrieves a data object that you can use to access the contents of the clipboard. |
From: Mark H. <mha...@us...> - 2008-07-19 06:23:35
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17304/win32com/test Modified Files: testExplorer.py Log Message: Add pythoncom.ObjectFromLresult() and a test using IE. Index: testExplorer.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExplorer.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** testExplorer.py 10 Jan 2006 06:32:18 -0000 1.6 --- testExplorer.py 19 Jul 2008 06:23:40 -0000 1.7 *************** *** 5,9 **** --- 5,12 ---- import os import win32com.client.dynamic + from win32com.client import Dispatch import win32api + import win32gui + import win32con import glob import pythoncom *************** *** 37,53 **** print "IE Event tests worked." ! def TestExplorer(iexplore): if not iexplore.Visible: iexplore.Visible = -1 ! try: ! iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm')) ! except pythoncom.com_error, details: ! print "Warning - could not open the test HTML file", details ! # for fname in glob.glob("..\\html\\*.html"): ! # print "Navigating to", fname ! # while iexplore.Busy: ! # win32api.Sleep(100) ! # iexplore.Navigate(win32api.GetFullPathName(fname)) ! win32api.Sleep(4000) try: iexplore.Quit() --- 40,69 ---- print "IE Event tests worked." ! def TestObjectFromWindow(): ! # Check we can use ObjectFromLresult to get the COM object from the ! # HWND - see KB Q249232 ! # Locating the HWND is different than the KB says... ! hwnd = win32gui.FindWindow('IEFrame', None) ! for child_class in ['TabWindowClass', 'Shell DocObject View', ! 'Internet Explorer_Server']: ! hwnd = win32gui.FindWindowEx(hwnd, 0, child_class, None) ! assert hwnd, "Couldn't find '%s" % (child_class,) ! # But here is the point - once you have an 'Internet Explorer_Server', ! # you can send a message and use ObjectFromLresult to get it back. ! msg = win32gui.RegisterWindowMessage("WM_HTML_GETOBJECT") ! rc, result = win32gui.SendMessageTimeout(hwnd, msg, 0, 0, win32con.SMTO_ABORTIFHUNG, 1000) ! ob = pythoncom.ObjectFromLresult(result, pythoncom.IID_IDispatch, 0) ! doc = Dispatch(ob) ! # just to prove it works, set the background color of the document. ! for color in "red green blue orange white".split(): ! doc.bgColor = color ! time.sleep(0.2) ! def TestExplorer(iexplore): if not iexplore.Visible: iexplore.Visible = -1 ! iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm')) ! win32api.Sleep(1000) ! TestObjectFromWindow() ! win32api.Sleep(3000) try: iexplore.Quit() |
From: Mark H. <mha...@us...> - 2008-07-04 01:55:10
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5386/lib Modified Files: win32rcparser.py Log Message: Fix [ 1953828 ] win32rcparser: stringTable error in GenerateFrozenResource >From Hugh Emberson Index: win32rcparser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32rcparser.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32rcparser.py 6 Sep 2004 23:51:03 -0000 1.4 --- win32rcparser.py 4 Jul 2008 01:55:13 -0000 1.5 *************** *** 112,115 **** --- 112,118 ---- self.value = value + def __repr__(self): + return "StringDef(%r, %r, %r)" % (self.id, self.idNum, self.value) + class RCParser: next_id = 1001 *************** *** 491,495 **** def ParseStreams(rc_file, h_file): rcp = RCParser() ! rcp.parseH(h_file) try: rcp.load(rc_file) --- 494,499 ---- def ParseStreams(rc_file, h_file): rcp = RCParser() ! if h_file: ! rcp.parseH(h_file) try: rcp.load(rc_file) *************** *** 544,547 **** --- 548,560 ---- out.write("__version__=%r\n" % __version__) out.write("_rc_size_=%d\n_rc_mtime_=%d\n" % (in_stat[stat.ST_SIZE], in_stat[stat.ST_MTIME])) + + out.write("class StringDef:\n") + out.write("\tdef __init__(self, id, idNum, value):\n") + out.write("\t\tself.id = id\n") + out.write("\t\tself.idNum = idNum\n") + out.write("\t\tself.value = value\n") + out.write("\tdef __repr__(self):\n") + out.write("\t\treturn \"StringDef(%r, %r, %r)\" % (self.id, self.idNum, self.value)\n") + out.write("class FakeParser:\n") |
From: Mark H. <mha...@us...> - 2008-07-04 01:55:06
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5386/test Modified Files: test_win32rcparser.py Log Message: Fix [ 1953828 ] win32rcparser: stringTable error in GenerateFrozenResource >From Hugh Emberson Index: test_win32rcparser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32rcparser.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_win32rcparser.py 26 May 2004 08:27:48 -0000 1.2 --- test_win32rcparser.py 4 Jul 2008 01:55:13 -0000 1.3 *************** *** 3,6 **** --- 3,7 ---- import win32rcparser import win32con + import tempfile class TestParser(unittest.TestCase): *************** *** 45,48 **** --- 46,66 ---- self.failUnlessEqual(num_ok, len(tabstop_ids) + len(notabstop_ids)) + class TestGenerated(TestParser): + def setUp(self): + # don't call base! + rc_file = os.path.join(os.path.dirname(__file__), "win32rcparser", "test.rc") + py_file = tempfile.mktemp('test_win32rcparser.py') + try: + win32rcparser.GenerateFrozenResource(rc_file, py_file) + py_source = open(py_file).read() + finally: + if os.path.isfile(py_file): + os.unlink(py_file) + + # poor-man's import :) + globs = {} + exec py_source in globs, globs + self.resources = globs["FakeParser"]() + if __name__=='__main__': unittest.main() |
From: Mark H. <mha...@us...> - 2008-07-03 13:29:59
|
Update of /cvsroot/pywin32/pywin32/isapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16605/src Modified Files: PyExtensionObjects.cpp PyFilterObjects.cpp Log Message: autoduck: clarify return value of GetServerVariable Index: PyExtensionObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PyExtensionObjects.cpp 15 May 2008 10:57:09 -0000 1.8 --- PyExtensionObjects.cpp 3 Jul 2008 13:30:04 -0000 1.9 *************** *** 329,332 **** --- 329,335 ---- // @pymethod string|EXTENSION_CONTROL_BLOCK|GetServerVariable| + // @rdesc The result is a string object, unless the server variable name + // begins with 'UNICODE_', in which case it is a unicode object - see the + // ISAPI docs for more details. PyObject * PyECB::GetServerVariable(PyObject *self, PyObject *args) { Index: PyFilterObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyFilterObjects.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyFilterObjects.cpp 11 Apr 2008 00:27:45 -0000 1.10 --- PyFilterObjects.cpp 3 Jul 2008 13:30:04 -0000 1.11 *************** *** 238,241 **** --- 238,244 ---- // @pymethod string|HTTP_FILTER_CONTEXT|GetServerVariable| + // @rdesc The result is a string object, unless the server variable name + // begins with 'UNICODE_', in which case it is a unicode object - see the + // ISAPI docs for more details. PyObject * PyHFC::GetServerVariable(PyObject *self, PyObject *args) { |
From: Mark H. <mha...@us...> - 2008-07-01 01:23:43
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18522 Modified Files: hierlist.py Log Message: allow unicode text so the COM browser doesn't break. Index: hierlist.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/hierlist.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** hierlist.py 4 Jun 2000 06:17:14 -0000 1.6 --- hierlist.py 1 Jul 2008 01:23:51 -0000 1.7 *************** *** 139,143 **** def AddItem(self, parentHandle, item, hInsertAfter = commctrl.TVI_LAST): text = self.GetText(item) - # hitem = self.list.InsertItem(text, 0, 1) if self.IsExpandable(item): cItems = 1 # Trick it !! --- 139,142 ---- *************** *** 147,150 **** --- 146,151 ---- bitmapSel = self.GetSelectedBitmapColumn(item) if bitmapSel is None: bitmapSel = bitmapCol + if type(text) is unicode: + text = text.encode("mbcs") hitem = self.list.InsertItem(parentHandle, hInsertAfter, (None, None, None, text, bitmapCol, bitmapSel, cItems, 0)) self.itemHandleMap[hitem] = item |
From: Mark H. <mha...@us...> - 2008-07-01 01:22:07
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17725 Modified Files: PyVARDESC.cpp Log Message: Remove warnings for VAR_DISPATCH as win32com.client already handled them. Index: PyVARDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyVARDESC.cpp 24 May 2008 02:55:34 -0000 1.5 --- PyVARDESC.cpp 1 Jul 2008 01:22:14 -0000 1.6 *************** *** 56,61 **** return NULL; v->lpvarValue = pVar; ! } ! else { PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind); } --- 56,63 ---- return NULL; v->lpvarValue = pVar; ! } else if (v->varkind == VAR_DISPATCH) { ! // nothing to do - memid is all that is needed by the caller. ! ; ! } else { PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind); } *************** *** 176,179 **** --- 178,185 ---- break; } + } else if (varkind == VAR_DISPATCH) { + // all caller needs is memid, which is already setup. + value = Py_None; + Py_INCREF(Py_None); } else { PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind); |
From: Mark H. <mha...@us...> - 2008-07-01 01:04:32
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11336 Modified Files: combrowse.py Log Message: reindent to 4 spaces due to inconsistent existing tabbed indentation Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** combrowse.py 12 Jul 2007 07:53:04 -0000 1.7 --- combrowse.py 1 Jul 2008 01:04:40 -0000 1.8 *************** *** 15,19 **** Details ! This module allows browsing of registered Type Libraries, COM categories, and running COM objects. The display is similar to the Pythonwin object browser, and displays the objects in a hierarchical window. --- 15,19 ---- Details ! This module allows browsing of registered Type Libraries, COM categories, and running COM objects. The display is similar to the Pythonwin object [...1005 lines suppressed...] ! root = HLIRoot("COM Browser") ! if sys.modules.has_key("app"): ! # do it in a window ! browser.MakeTemplate() ! browser.template.OpenObject(root) ! else: ! # list=hierlist.HierListWithItems( root, win32ui.IDB_BROWSER_HIER ) ! # dlg=hierlist.HierDialog("COM Browser",list) ! dlg = browser.dynamic_browser(root) ! dlg.DoModal() if __name__=='__main__': ! main() + ni = pythoncom._GetInterfaceCount() + ng = pythoncom._GetGatewayCount() + if ni or ng: + print "Warning - exiting with %d/%d objects alive" % (ni,ng) |
From: Mark H. <mha...@us...> - 2008-07-01 00:17:34
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26019 Modified Files: makepy.py Log Message: Remove the final file before we create the temp file. Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** makepy.py 1 Jul 2008 00:10:42 -0000 1.24 --- makepy.py 1 Jul 2008 00:17:41 -0000 1.25 *************** *** 269,272 **** --- 269,276 ---- # generate to a temp file (so errors don't leave a 1/2 # generated file) and one which can handle unicode! + try: + os.unlink(outputName) + except os.error: + pass encoding = 'mbcs' # could make this a param. fileUse = codecs.open(outputName + ".temp", "wt", |
From: Mark H. <mha...@us...> - 2008-07-01 00:11:49
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23796/test Modified Files: testPyComTest.py Log Message: test unicode constant with extended character Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** testPyComTest.py 24 May 2008 02:55:34 -0000 1.31 --- testPyComTest.py 1 Jul 2008 00:11:57 -0000 1.32 *************** *** 277,281 **** TestConstant("UCharTest", 255) TestConstant("CharTest", -1) ! TestConstant("StringTest", "Hello Loraine") now = pythoncom.MakeTime(time.gmtime(time.time())) --- 277,282 ---- TestConstant("UCharTest", 255) TestConstant("CharTest", -1) ! # 'Hello Loraine', but the 'r' is the "Registered" sign (\xae) ! TestConstant("StringTest", u"Hello Lo\xaeaine") now = pythoncom.MakeTime(time.gmtime(time.time())) |
From: Mark H. <mha...@us...> - 2008-07-01 00:11:06
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23746/client Modified Files: genpy.py Log Message: Fix unicode handling in generated file. Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** genpy.py 24 May 2008 02:55:34 -0000 1.54 --- genpy.py 1 Jul 2008 00:11:14 -0000 1.55 *************** *** 24,28 **** error = "makepy.error" ! makepy_version = "0.4.97" # Written to generated file. GEN_FULL="full" --- 24,28 ---- error = "makepy.error" ! makepy_version = "0.4.98" # Written to generated file. GEN_FULL="full" *************** *** 214,218 **** use = hex(val) else: ! use = repr(str(val)) print >> stream, "\t%-30s=%-10s # from enum %s" % \ (build.MakePublicAttributeName(name, True), use, enumName) --- 214,218 ---- use = hex(val) else: ! use = repr(val) print >> stream, "\t%-30s=%-10s # from enum %s" % \ (build.MakePublicAttributeName(name, True), use, enumName) *************** *** 783,788 **** self.bHaveWrittenCoClassBaseClass = 0 self.bHaveWrittenEventBaseClass = 0 ! print >> self.file, '# -*- coding: mbcs -*-' # Is this always correct? print >> self.file, '# Created by makepy.py version %s' % (makepy_version,) print >> self.file, '# By python version %s' % \ --- 783,789 ---- self.bHaveWrittenCoClassBaseClass = 0 self.bHaveWrittenEventBaseClass = 0 + encoding = self.file.encoding or "mbcs" ! print >> self.file, '# -*- coding: %s -*-' % (encoding,) print >> self.file, '# Created by makepy.py version %s' % (makepy_version,) print >> self.file, '# By python version %s' % \ |
From: Mark H. <mha...@us...> - 2008-07-01 00:10:34
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23166/client Modified Files: makepy.py Log Message: * Use a file wrapper from the codecs package to ensure correct unicode handling. * Generate to a .temp file so an error doesn't leave a 1/2 generated file. Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** makepy.py 28 Mar 2007 12:34:51 -0000 1.23 --- makepy.py 1 Jul 2008 00:10:42 -0000 1.24 *************** *** 68,71 **** --- 68,72 ---- import genpy, string, sys, os, types, pythoncom + import codecs import selecttlb import gencache *************** *** 266,270 **** else: outputName = full_name + ".py" ! fileUse = open(outputName, "wt") progress.LogBeginGenerate(outputName) else: --- 267,275 ---- else: outputName = full_name + ".py" ! # generate to a temp file (so errors don't leave a 1/2 ! # generated file) and one which can handle unicode! ! encoding = 'mbcs' # could make this a param. ! fileUse = codecs.open(outputName + ".temp", "wt", ! encoding) progress.LogBeginGenerate(outputName) else: *************** *** 277,280 **** --- 282,286 ---- if file is None: fileUse.close() + os.rename(outputName + ".temp", outputName) if bToGenDir: |
From: Mark H. <mha...@us...> - 2008-07-01 00:07:51
|
Update of /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22257 Modified Files: PyCOMTest.idl Log Message: Add some extended characters to a few strings to stress makepy and unicode Index: PyCOMTest.idl =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMTest.idl,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PyCOMTest.idl 24 May 2008 02:55:34 -0000 1.18 --- PyCOMTest.idl 1 Jul 2008 00:07:58 -0000 1.19 *************** *** 26,30 **** uuid(6bcdcb60-5605-11d0-ae5f-cadd4c000000), version(1.1), ! helpstring("Python COM Test Harness 1.0 Type Library") ] library PyCOMTestLib --- 26,31 ---- uuid(6bcdcb60-5605-11d0-ae5f-cadd4c000000), version(1.1), ! // an extended character in the help string should stress things... ! helpstring("Python COM Test Harness 1.0 Type Library, © pywin32 contributors") ] library PyCOMTestLib *************** *** 70,74 **** const unsigned char UCharTest = 255; const char CharTest = -1; ! const LPWSTR StringTest = L"Hello Loraine"; }; --- 71,75 ---- const unsigned char UCharTest = 255; const char CharTest = -1; ! const LPWSTR StringTest = L"Hello Lo®aine"; }; |
From: Mark H. <mha...@us...> - 2008-06-30 13:50:02
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14726 Modified Files: testExchange.py Log Message: Hack into working somewhat on Outlook 2007 Index: testExchange.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExchange.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** testExchange.py 23 Oct 2005 11:31:35 -0000 1.6 --- testExchange.py 30 Jun 2008 13:50:09 -0000 1.7 *************** *** 8,12 **** import os ! ammodule = gencache.EnsureModule('{3FA7DEA7-6438-101B-ACC1-00AA00423326}', 0, 1, 1) def GetDefaultProfileName(): --- 8,12 ---- import os ! ammodule = None # was the generated module! def GetDefaultProfileName(): *************** *** 33,37 **** def DumpFolders(session): ! infostores = session.InfoStores print infostores print "There are %d infostores" % infostores.Count --- 33,45 ---- def DumpFolders(session): ! try: ! infostores = session.InfoStores ! except AttributeError: ! # later outlook? ! store = session.DefaultStore ! folder = store.GetRootFolder() ! DumpFolder(folder) ! return ! print infostores print "There are %d infostores" % infostores.Count *************** *** 65,70 **** def TestUser(session): ae = session.CurrentUser ! fields = ae.Fields ! print "User has %d fields" % fields.Count for f in range(len(fields)): field = fields[f+1] --- 73,78 ---- def TestUser(session): ae = session.CurrentUser ! fields = getattr(ae, "Fields", []) ! print "User has %d fields" % len(fields) for f in range(len(fields)): field = fields[f+1] *************** *** 76,91 **** def test(): - if not ammodule: - print "MAPI does not appear to be installed on this machine - skipping." - return - import win32com.client oldcwd = os.getcwd() - session = win32com.client.Dispatch("MAPI.Session") try: ! session.Logon(GetDefaultProfileName()) ! except pythoncom.com_error, details: ! print "Could not log on to MAPI:", details ! return try: TestUser(session) --- 84,101 ---- def test(): import win32com.client oldcwd = os.getcwd() try: ! session = gencache.EnsureDispatch("MAPI.Session") ! try: ! session.Logon(GetDefaultProfileName()) ! except pythoncom.com_error, details: ! print "Could not log on to MAPI:", details ! return ! except pythoncom.error: ! # no mapi.session - let's try outlook ! app = gencache.EnsureDispatch("Outlook.Application") ! session = app.Session ! try: TestUser(session) |
From: Mark H. <mha...@us...> - 2008-06-30 13:22:31
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5992/Pythonwin Modified Files: License.txt Log Message: Welcome to 2008, only 7 years late :) Index: License.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/License.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** License.txt 20 Feb 2001 22:53:22 -0000 1.2 --- License.txt 30 Jun 2008 13:22:37 -0000 1.3 *************** *** 1,4 **** Unless stated in the specfic source file, this work is ! Copyright (c) 1994-2001, Mark Hammond All rights reserved. --- 1,4 ---- Unless stated in the specfic source file, this work is ! Copyright (c) 1994-2008, Mark Hammond All rights reserved. |
From: Mark H. <mha...@us...> - 2008-06-30 13:22:31
|
Update of /cvsroot/pywin32/pywin32/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5992/win32 Modified Files: License.txt Log Message: Welcome to 2008, only 7 years late :) Index: License.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/License.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** License.txt 20 Feb 2001 22:53:23 -0000 1.3 --- License.txt 30 Jun 2008 13:22:37 -0000 1.4 *************** *** 1,4 **** Unless stated in the specfic source file, this work is ! Copyright (c) 1994-2001, Mark Hammond All rights reserved. --- 1,4 ---- Unless stated in the specfic source file, this work is ! Copyright (c) 1994-2008, Mark Hammond All rights reserved. |
From: Mark H. <mha...@us...> - 2008-06-30 13:22:31
|
Update of /cvsroot/pywin32/pywin32/com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5992/com Modified Files: License.txt Log Message: Welcome to 2008, only 7 years late :) Index: License.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/License.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** License.txt 20 Feb 2001 22:53:23 -0000 1.3 --- License.txt 30 Jun 2008 13:22:37 -0000 1.4 *************** *** 1,4 **** Unless stated in the specfic source file, this work is ! Copyright (c) 1996-2001, Greg Stein and Mark Hammond. All rights reserved. --- 1,4 ---- Unless stated in the specfic source file, this work is ! Copyright (c) 1996-2008, Greg Stein and Mark Hammond. All rights reserved. |
From: Mark H. <mha...@us...> - 2008-06-30 12:59:04
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29468/win32/Lib Modified Files: win32traceutil.py Log Message: Allow Ctrl+C to cleanly shut down the trace collector. Index: win32traceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32traceutil.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32traceutil.py 8 Jan 2002 05:41:13 -0000 1.2 --- win32traceutil.py 30 Jun 2008 12:59:11 -0000 1.3 *************** *** 20,24 **** # Note - the client or the collector can be started first. ! # There is a 64k buffer. If this gets full, it is reset, and new # output appended from the start. --- 20,24 ---- # Note - the client or the collector can be started first. ! # There is a 0x20000 byte buffer. If this gets full, it is reset, and new # output appended from the start. *************** *** 34,41 **** win32trace.InitRead() print "Collecting Python Trace Output..." ! # import win32api;win32api.DebugBreak() ! while 1: ! # print win32trace.blockingread() ! sys.stdout.write(win32trace.blockingread()) --- 34,43 ---- win32trace.InitRead() print "Collecting Python Trace Output..." ! try: ! while 1: ! # a short timeout means ctrl+c works next time we wake... ! sys.stdout.write(win32trace.blockingread(500)) ! except KeyboardInterrupt: ! print "Ctrl+C" |
From: Mark H. <mha...@us...> - 2008-06-30 12:57:54
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29057/win32/Demos Modified Files: win32gui_menu.py Log Message: Add demo for GetMenuItemInfo Index: win32gui_menu.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_menu.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32gui_menu.py 30 Oct 2007 09:27:13 -0000 1.6 --- win32gui_menu.py 30 Jun 2008 12:58:02 -0000 1.7 *************** *** 250,255 **** rc = CheckMenuRadioItem(self.sub_menu, 1004, 1005, id, win32con.MF_BYCOMMAND) ! new_state = GetMenuState(self.sub_menu, id, win32con.MF_BYCOMMAND) ! if new_state & win32con.MF_CHECKED != check_flags: raise RuntimeError, "The new item didn't get the new checked state!" else: --- 250,260 ---- rc = CheckMenuRadioItem(self.sub_menu, 1004, 1005, id, win32con.MF_BYCOMMAND) ! # Now get the info via GetMenuItemInfo and check the new state ! buf, extras = EmptyMENUITEMINFO() ! win32gui.GetMenuItemInfo(self.sub_menu, id, False, buf) ! fType, fState, wID, hSubMenu, hbmpChecked, hbmpUnchecked, \ ! dwItemData, text, hbmpItem = UnpackMENUITEMINFO(buf) ! ! if fState & win32con.MF_CHECKED != check_flags: raise RuntimeError, "The new item didn't get the new checked state!" else: |