pywin32-checkins Mailing List for Python for Windows Extensions (Page 148)
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: <mha...@us...> - 2003-11-02 05:26:39
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv5588 Modified Files: MiscTypes.cpp PyIBase.cpp Log Message: Roger inspired me to do tp_iter support in a far more generic way. Should be possible to make all Enums and Providers support tp_iter() simply by declaring the correct type - no implementation of the iter()/iternext() should be necessary. All enums in the core package should now support Enums correctly (a few more could possibly be nominated as Enum providers though. Index: MiscTypes.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/MiscTypes.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MiscTypes.cpp 31 Oct 2003 06:55:12 -0000 1.5 --- MiscTypes.cpp 2 Nov 2003 05:26:13 -0000 1.6 *************** *** 113,128 **** PyComTypeObject( name, pBase, typeSize, methodList, thector) { ! tp_iter = PyIBase::iter; ! tp_iternext = PyIBase::iternext; ! tp_flags |= Py_TPFLAGS_HAVE_ITER; } // Our type for IEnum provider interfaces ! PyComEnumProviderTypeObject::PyComEnumProviderTypeObject( const char *name, PyComTypeObject *pBase, int typeSize, struct PyMethodDef* methodList, PyIUnknown * (* thector)(IUnknown *)) : ! PyComTypeObject( name, pBase, typeSize, methodList, thector) { ! tp_iter = PyIBase::iter; ! // tp_iternext remains NULL ! tp_flags |= Py_TPFLAGS_HAVE_ITER; } --- 113,135 ---- PyComTypeObject( name, pBase, typeSize, methodList, thector) { ! tp_iter = PyIEnum::iter; ! tp_iternext = PyIEnum::iternext; ! tp_flags |= Py_TPFLAGS_HAVE_ITER; } // Our type for IEnum provider interfaces ! PyComEnumProviderTypeObject::PyComEnumProviderTypeObject( ! const char *name, ! PyComTypeObject *pBase, ! int typeSize, ! struct PyMethodDef* methodList, ! PyIUnknown * (* thector)(IUnknown *), ! const char *penum_method_name) : ! PyComTypeObject( name, pBase, typeSize, methodList, thector), ! enum_method_name(penum_method_name) { ! tp_iter = PyIEnumProvider::iter; ! // tp_iternext remains NULL ! tp_flags |= Py_TPFLAGS_HAVE_ITER; } Index: PyIBase.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIBase.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyIBase.cpp 31 Oct 2003 06:55:12 -0000 1.5 --- PyIBase.cpp 2 Nov 2003 05:26:13 -0000 1.6 *************** *** 55,72 **** } - PyObject * - PyIBase::iter() - { - return PyErr_Format(PyExc_RuntimeError, - "iter must be overridden by objects supporting enumeration (type '%s').", ob_type->tp_name); - } - - PyObject * - PyIBase::iternext() - { - return PyErr_Format(PyExc_RuntimeError, - "iternext must be overridden by objects supporting enumeration (type '%s').", ob_type->tp_name); - } - /*static*/int PyIBase::setattr(PyObject *op, char *name, PyObject *v) { --- 55,58 ---- *************** *** 104,114 **** } ! /*static*/ PyObject *PyIBase::iter(PyObject *self) { ! return ((PyIBase *)self)->iter(); } ! /*static*/ PyObject *PyIBase::iternext(PyObject *self) { ! return ((PyIBase *)self)->iternext(); } --- 90,134 ---- } ! // PyIEnum iter methods - generic for any "standard" COM IEnum interface. ! PyObject *PyIEnum::iter() { ! Py_INCREF(this); ! return this; } ! PyObject *PyIEnum::iternext() { ! PyObject *method = PyObject_GetAttrString(this, "Next"); ! if (!method) ! return NULL; ! PyObject *args=Py_BuildValue("(i)", 1); ! PyObject *result = PyObject_Call(method, args, NULL); ! Py_DECREF(method); ! Py_DECREF(args); ! if (!result) ! return NULL; ! PyObject *ret; ! if (PySequence_Length(result)==0){ ! PyErr_SetNone(PyExc_StopIteration); ! ret = NULL; ! } else ! ret = PySequence_GetItem(result, 0); ! Py_DECREF(result); ! return ret; ! } ! ! // PyIEnumProvider iter methods - generic for COM object that can provide an IEnum* ! // interface via a method call taking no args. ! PyObject *PyIEnumProvider::iter() ! { ! PyComEnumProviderTypeObject *t = (PyComEnumProviderTypeObject *)ob_type; ! PyObject *method = PyObject_GetAttrString(this, (char *)t->enum_method_name); ! if (!method) ! return NULL; ! PyObject *args=PyTuple_New(0); ! PyObject *result = PyObject_Call(method, args, NULL); ! Py_DECREF(method); ! Py_DECREF(args); ! return result; } + |
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv5588/extensions Modified Files: PyIEnumCATEGORYINFO.cpp PyIEnumConnectionPoints.cpp PyIEnumConnections.cpp PyIEnumFORMATETC.cpp PyIEnumGUID.cpp PyIEnumSTATPROPSETSTG.cpp PyIEnumSTATPROPSTG.cpp PyIEnumSTATSTG.cpp PyIEnumVARIANT.cpp PyIPropertySetStorage.cpp PyIPropertyStorage.cpp Log Message: Roger inspired me to do tp_iter support in a far more generic way. Should be possible to make all Enums and Providers support tp_iter() simply by declaring the correct type - no implementation of the iter()/iternext() should be necessary. All enums in the core package should now support Enums correctly (a few more could possibly be nominated as Enum providers though. Index: PyIEnumCATEGORYINFO.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumCATEGORYINFO.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIEnumCATEGORYINFO.cpp 10 Jan 2003 02:47:13 -0000 1.4 --- PyIEnumCATEGORYINFO.cpp 2 Nov 2003 05:26:13 -0000 1.5 *************** *** 11,15 **** PyIEnumCATEGORYINFO::PyIEnumCATEGORYINFO(IUnknown *pDisp) : ! PyIUnknown(pDisp) { ob_type = &type; --- 11,15 ---- PyIEnumCATEGORYINFO::PyIEnumCATEGORYINFO(IUnknown *pDisp) : ! PyIEnum(pDisp) { ob_type = &type; *************** *** 145,149 **** }; ! PyComTypeObject PyIEnumCATEGORYINFO::type("PyIEnumCATEGORYINFO", &PyIUnknown::type, // @base PyIEnumCATEGORYINFO|PyIUnknown sizeof(PyIEnumCATEGORYINFO), --- 145,149 ---- }; ! PyComEnumTypeObject PyIEnumCATEGORYINFO::type("PyIEnumCATEGORYINFO", &PyIUnknown::type, // @base PyIEnumCATEGORYINFO|PyIUnknown sizeof(PyIEnumCATEGORYINFO), Index: PyIEnumConnectionPoints.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumConnectionPoints.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIEnumConnectionPoints.cpp 24 Nov 1999 10:03:51 -0000 1.1 --- PyIEnumConnectionPoints.cpp 2 Nov 2003 05:26:13 -0000 1.2 *************** *** 14,18 **** PyIEnumConnectionPoints::PyIEnumConnectionPoints(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 14,18 ---- PyIEnumConnectionPoints::PyIEnumConnectionPoints(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 148,152 **** }; ! PyComTypeObject PyIEnumConnectionPoints::type("PyIEnumConnectionPoints", &PyIUnknown::type, // @base PyIEnumConnectionPoints|PyIUnknown sizeof(PyIEnumConnectionPoints), --- 148,152 ---- }; ! PyComEnumTypeObject PyIEnumConnectionPoints::type("PyIEnumConnectionPoints", &PyIUnknown::type, // @base PyIEnumConnectionPoints|PyIUnknown sizeof(PyIEnumConnectionPoints), Index: PyIEnumConnections.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumConnections.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumConnections.cpp 19 Nov 1999 04:03:23 -0000 1.2 --- PyIEnumConnections.cpp 2 Nov 2003 05:26:13 -0000 1.3 *************** *** 14,18 **** PyIEnumConnections::PyIEnumConnections(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 14,18 ---- PyIEnumConnections::PyIEnumConnections(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 141,145 **** }; ! PyComTypeObject PyIEnumConnections::type("PyIEnumConnections", &PyIUnknown::type, // @base PyIEnumConnections|PyIUnknown sizeof(PyIEnumConnections), --- 141,145 ---- }; ! PyComEnumTypeObject PyIEnumConnections::type("PyIEnumConnections", &PyIUnknown::type, // @base PyIEnumConnections|PyIUnknown sizeof(PyIEnumConnections), Index: PyIEnumFORMATETC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumFORMATETC.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIEnumFORMATETC.cpp 31 Oct 2003 06:55:12 -0000 1.4 --- PyIEnumFORMATETC.cpp 2 Nov 2003 05:26:13 -0000 1.5 *************** *** 16,20 **** PyIEnumFORMATETC::PyIEnumFORMATETC(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 16,20 ---- PyIEnumFORMATETC::PyIEnumFORMATETC(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 28,58 **** { return (IEnumFORMATETC *)PyIUnknown::GetI(self); - } - - PyObject * - PyIEnumFORMATETC::iter() - { - Py_INCREF(this); - return this; - } - - PyObject * - PyIEnumFORMATETC::iternext() - { - ULONG celtFetched = 0; - FORMATETC ret;; - IEnumFORMATETC *peidl = GetI(this); - if ( peidl == NULL ) - return NULL; - PY_INTERFACE_PRECALL; - HRESULT hr = peidl->Next(1, &ret, &celtFetched); - PY_INTERFACE_POSTCALL; - if ( HRESULT_CODE(hr) != ERROR_NO_MORE_ITEMS && FAILED(hr) ) - return PyCom_BuildPyException(hr,peidl, IID_IEnumFORMATETC); - if (celtFetched==0) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - return PyObject_FromFORMATETC(&ret); } --- 28,31 ---- Index: PyIEnumGUID.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumGUID.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIEnumGUID.cpp 31 Oct 2003 07:20:58 -0000 1.3 --- PyIEnumGUID.cpp 2 Nov 2003 05:26:13 -0000 1.4 *************** *** 11,15 **** PyIEnumGUID::PyIEnumGUID(IUnknown *pDisp) : ! PyIUnknown(pDisp) { ob_type = &type; --- 11,15 ---- PyIEnumGUID::PyIEnumGUID(IUnknown *pDisp) : ! PyIEnum(pDisp) { ob_type = &type; *************** *** 140,144 **** }; ! PyComTypeObject PyIEnumGUID::type("PyIEnumGUID", &PyIUnknown::type, // @base PyIEnumGUID|PyIUnknown sizeof(PyIEnumGUID), --- 140,144 ---- }; ! PyComEnumTypeObject PyIEnumGUID::type("PyIEnumGUID", &PyIUnknown::type, // @base PyIEnumGUID|PyIUnknown sizeof(PyIEnumGUID), Index: PyIEnumSTATPROPSETSTG.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumSTATPROPSETSTG.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIEnumSTATPROPSETSTG.cpp 30 Oct 2003 06:32:26 -0000 1.1 --- PyIEnumSTATPROPSETSTG.cpp 2 Nov 2003 05:26:13 -0000 1.2 *************** *** 16,20 **** PyIEnumSTATPROPSETSTG::PyIEnumSTATPROPSETSTG(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 16,20 ---- PyIEnumSTATPROPSETSTG::PyIEnumSTATPROPSETSTG(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 148,152 **** }; ! PyComTypeObject PyIEnumSTATPROPSETSTG::type("PyIEnumSTATPROPSETSTG", &PyIUnknown::type, sizeof(PyIEnumSTATPROPSETSTG), --- 148,152 ---- }; ! PyComEnumTypeObject PyIEnumSTATPROPSETSTG::type("PyIEnumSTATPROPSETSTG", &PyIUnknown::type, sizeof(PyIEnumSTATPROPSETSTG), Index: PyIEnumSTATPROPSTG.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumSTATPROPSTG.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIEnumSTATPROPSTG.cpp 24 Nov 1999 10:03:00 -0000 1.3 --- PyIEnumSTATPROPSTG.cpp 2 Nov 2003 05:26:13 -0000 1.4 *************** *** 16,20 **** PyIEnumSTATPROPSTG::PyIEnumSTATPROPSTG(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 16,20 ---- PyIEnumSTATPROPSTG::PyIEnumSTATPROPSTG(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 153,157 **** }; ! PyComTypeObject PyIEnumSTATPROPSTG::type("PyIEnumSTATPROPSTG", &PyIUnknown::type, sizeof(PyIEnumSTATPROPSTG), --- 153,157 ---- }; ! PyComEnumTypeObject PyIEnumSTATPROPSTG::type("PyIEnumSTATPROPSTG", &PyIUnknown::type, sizeof(PyIEnumSTATPROPSTG), Index: PyIEnumSTATSTG.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumSTATSTG.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumSTATSTG.cpp 19 Nov 1999 04:03:23 -0000 1.2 --- PyIEnumSTATSTG.cpp 2 Nov 2003 05:26:13 -0000 1.3 *************** *** 14,18 **** PyIEnumSTATSTG::PyIEnumSTATSTG(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 14,18 ---- PyIEnumSTATSTG::PyIEnumSTATSTG(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 155,159 **** }; ! PyComTypeObject PyIEnumSTATSTG::type("PyIEnumSTATSTG", &PyIUnknown::type, // @base PyIEnumStatSTG|PyIUnknown sizeof(PyIEnumSTATSTG), --- 155,159 ---- }; ! PyComEnumTypeObject PyIEnumSTATSTG::type("PyIEnumSTATSTG", &PyIUnknown::type, // @base PyIEnumStatSTG|PyIUnknown sizeof(PyIEnumSTATSTG), Index: PyIEnumVARIANT.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumVARIANT.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyIEnumVARIANT.cpp 31 Oct 2003 06:55:12 -0000 1.5 --- PyIEnumVARIANT.cpp 2 Nov 2003 05:26:13 -0000 1.6 *************** *** 4,8 **** PyIEnumVARIANT::PyIEnumVARIANT(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 4,8 ---- PyIEnumVARIANT::PyIEnumVARIANT(IUnknown *pdisp): ! PyIEnum(pdisp) { ob_type = &type; *************** *** 11,45 **** PyIEnumVARIANT::~PyIEnumVARIANT() { - } - - PyObject * - PyIEnumVARIANT::iter() - { - Py_INCREF(this); - return this; - } - - PyObject * - PyIEnumVARIANT::iternext() - { - IEnumVARIANT *pIEVARIANT = GetI(this); - if ( pIEVARIANT == NULL ) - return NULL; - - VARIANT var; - VariantInit(&var); - ULONG celtFetched; - PY_INTERFACE_PRECALL; - HRESULT hr = pIEVARIANT->Next(1, &var, &celtFetched); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) - return PyCom_BuildPyException(hr); - if (celtFetched==0) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - PyObject *ret = PyCom_PyObjectFromVariant(&var); - VariantClear(&var); - return ret; } --- 11,14 ---- Index: PyIPropertySetStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIPropertySetStorage.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIPropertySetStorage.cpp 19 Nov 1999 04:03:23 -0000 1.2 --- PyIPropertySetStorage.cpp 2 Nov 2003 05:26:13 -0000 1.3 *************** *** 14,18 **** PyIPropertySetStorage::PyIPropertySetStorage(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 14,18 ---- PyIPropertySetStorage::PyIPropertySetStorage(IUnknown *pdisp): ! PyIEnumProvider(pdisp) { ob_type = &type; *************** *** 146,153 **** }; ! PyComTypeObject PyIPropertySetStorage::type("PyIPropertySetStorage", &PyIUnknown::type, sizeof(PyIPropertySetStorage), PyIPropertySetStorage_methods, ! GET_PYCOM_CTOR(PyIPropertySetStorage)); #endif // NO_PYCOM_IPROPERTYSETSTORAGE --- 146,154 ---- }; ! PyComEnumProviderTypeObject PyIPropertySetStorage::type("PyIPropertySetStorage", &PyIUnknown::type, sizeof(PyIPropertySetStorage), PyIPropertySetStorage_methods, ! GET_PYCOM_CTOR(PyIPropertySetStorage), ! "Enum"); #endif // NO_PYCOM_IPROPERTYSETSTORAGE Index: PyIPropertyStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIPropertyStorage.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PyIPropertyStorage.cpp 31 Oct 2003 02:44:08 -0000 1.6 --- PyIPropertyStorage.cpp 2 Nov 2003 05:26:13 -0000 1.7 *************** *** 247,251 **** PyIPropertyStorage::PyIPropertyStorage(IUnknown *pdisp): ! PyIUnknown(pdisp) { ob_type = &type; --- 247,251 ---- PyIPropertyStorage::PyIPropertyStorage(IUnknown *pdisp): ! PyIEnumProvider(pdisp) { ob_type = &type; *************** *** 334,337 **** --- 334,338 ---- PyObject_FreePROPSPECs(pProps, cProps); PyObject_FreePROPVARIANTs(pVals, cVals); + return NULL; } *************** *** 673,681 **** }; ! PyComTypeObject PyIPropertyStorage::type("PyIPropertyStorage", &PyIUnknown::type, sizeof(PyIPropertyStorage), PyIPropertyStorage_methods, ! GET_PYCOM_CTOR(PyIPropertyStorage)); #endif // NO_PYCOM_IPROPERTYSTORAGE --- 674,683 ---- }; ! PyComEnumProviderTypeObject PyIPropertyStorage::type("PyIPropertyStorage", &PyIUnknown::type, sizeof(PyIPropertyStorage), PyIPropertyStorage_methods, ! GET_PYCOM_CTOR(PyIPropertyStorage), ! "Enum"); #endif // NO_PYCOM_IPROPERTYSTORAGE |
From: <mha...@us...> - 2003-10-31 23:47:51
|
Update of /cvsroot/pywin32/pywin32/com In directory sc8-pr-cvs1:/tmp/cvs-serv30595/com Modified Files: pythoncom.py Log Message: For frozen programs, if a sys.path entry is a file, look in its directory. pythoncom now simply re-uses pywintypes logic rather than duplicating it. Index: pythoncom.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/pythoncom.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pythoncom.py 6 Oct 2003 13:05:56 -0000 1.3 --- pythoncom.py 31 Oct 2003 23:47:46 -0000 1.4 *************** *** 1,32 **** # Magic utility that "redirects" to pythoncomxx.dll ! ! def __import(modname): ! import win32api, imp, sys, os ! suffix = "" ! if win32api.__file__.endswith("_d.pyd")>0: ! suffix = "_d" ! filename = "%s%d%d%s.dll" % (modname, sys.version_info[0], sys.version_info[1], suffix) ! if hasattr(sys, "frozen"): ! # If we are running from a frozen program (py2exe, McMillan, freeze) ! # then we try and load the DLL from our sys.path ! for look in sys.path: ! found = os.path.join(look, filename) ! if os.path.isfile(found): ! break ! else: ! raise ImportError, "Module '%s' isn't in frozen sys.path directories" % modname ! h = None ! else: ! # Normal Python needs these files in a directory somewhere on ! # %PATH%, so let Windows search it out for us ! h = win32api.LoadLibrary(filename) ! found = win32api.GetModuleFileName(h) ! # Python can load the module ! mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) ! # and fill our namespace with it. ! globals().update(mod.__dict__) ! if h is not None: ! win32api.FreeLibrary(h) ! ! __import("pythoncom") ! del __import --- 1,3 ---- # Magic utility that "redirects" to pythoncomxx.dll ! import pywintypes ! pywintypes.__import_pywin32_system_module__("pythoncom", globals()) |
From: <mha...@us...> - 2003-10-31 23:47:49
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv30595/win32/lib Modified Files: pywintypes.py Log Message: For frozen programs, if a sys.path entry is a file, look in its directory. pythoncom now simply re-uses pywintypes logic rather than duplicating it. Index: pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/pywintypes.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pywintypes.py 31 Oct 2003 03:11:13 -0000 1.5 --- pywintypes.py 31 Oct 2003 23:47:46 -0000 1.6 *************** *** 1,5 **** # Magic utility that "redirects" to pywintypesxx.dll ! def __import(modname): # *sigh* - non-admin installs will not have pywintypesxx.dll in the # system directory, so 'import win32api' will fail looking --- 1,5 ---- # Magic utility that "redirects" to pywintypesxx.dll ! def __import_pywin32_system_module__(modname, globs): # *sigh* - non-admin installs will not have pywintypesxx.dll in the # system directory, so 'import win32api' will fail looking *************** *** 20,23 **** --- 20,27 ---- # then we try and load the DLL from our sys.path for look in sys.path: + # If the sys.path entry is a (presumably) .zip file, use the + # directory + if os.path.isfile(look): + look = os.path.dirname(look) found = os.path.join(look, filename) if os.path.isfile(found): *************** *** 38,43 **** mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) # and fill our namespace with it. ! globals().update(mod.__dict__) - __import("pywintypes") - del __import --- 42,47 ---- mod = imp.load_module(modname, None, found, ('.dll', 'rb', imp.C_EXTENSION)) # and fill our namespace with it. ! globs.update(mod.__dict__) ! ! __import_pywin32_system_module__("pywintypes", globals()) |
From: <mha...@us...> - 2003-10-31 13:57:23
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1:/tmp/cvs-serv16273 Modified Files: testvbscript_regexp.py Log Message: Oops - make the test actually do something! Index: testvbscript_regexp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testvbscript_regexp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testvbscript_regexp.py 31 Oct 2003 13:52:24 -0000 1.1 --- testvbscript_regexp.py 31 Oct 2003 13:57:18 -0000 1.2 *************** *** 26,34 **** def testDynamic(self): ! re = EnsureDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) ! def testDynamic(self): ! re = DumbDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) --- 26,34 ---- def testDynamic(self): ! re = DumbDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) ! def testGenerated(self): ! re = EnsureDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) |
From: <mha...@us...> - 2003-10-31 13:52:29
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1:/tmp/cvs-serv15354 Modified Files: testall.py Added Files: testvbscript_regexp.py Log Message: Add a simple test for the vbscript.regexp object --- NEW FILE: testvbscript_regexp.py --- import unittest from win32com.client.gencache import EnsureDispatch from win32com.client.dynamic import DumbDispatch class RegexTest(unittest.TestCase): def _CheckMatches(self, match, expected): found = [] for imatch in match: found.append(imatch.FirstIndex) self.assertEquals(list(found), list(expected)) def _TestVBScriptRegex(self, re): StringToSearch = "Python python pYthon Python" re.Pattern = "Python" re.Global = True re.IgnoreCase = True match = re.Execute(StringToSearch) expected = 0, 7, 14, 21 self._CheckMatches(match, expected) re.IgnoreCase = False match = re.Execute(StringToSearch) expected = 0, 21 self._CheckMatches(match, expected) def testDynamic(self): re = EnsureDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) def testDynamic(self): re = DumbDispatch("VBScript.Regexp") self._TestVBScriptRegex(re) if __name__=='__main__': unittest.main() Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testall.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** testall.py 23 Oct 2003 23:48:28 -0000 1.16 --- testall.py 31 Oct 2003 13:52:24 -0000 1.17 *************** *** 38,42 **** print "***** %s test FAILED after %d lines of output" % (desc, capture.get_num_lines_captured()) ! unittest_modules = "testIterators".split() if __name__=='__main__': --- 38,42 ---- print "***** %s test FAILED after %d lines of output" % (desc, capture.get_num_lines_captured()) ! unittest_modules = "testIterators testvbscript_regexp".split() if __name__=='__main__': |
From: <mha...@us...> - 2003-10-31 12:41:02
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv3599 Modified Files: PyICatRegister.cpp Log Message: Cast literal -1 to DWORD Index: PyICatRegister.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyICatRegister.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyICatRegister.cpp 10 Jan 2003 02:47:13 -0000 1.3 --- PyICatRegister.cpp 31 Oct 2003 12:40:59 -0000 1.4 *************** *** 107,111 **** Py_DECREF(obThis); OLECHAR *oc; ! if (PyWin_String_AsWCHAR(desc, -1, &oc)) { wcsncpy(infos[i].szDescription, oc, sizeof(infos->szDescription)); PyWinObject_FreeString(oc); --- 107,111 ---- Py_DECREF(obThis); OLECHAR *oc; ! if (PyWin_String_AsWCHAR(desc, (DWORD)-1, &oc)) { wcsncpy(infos[i].szDescription, oc, sizeof(infos->szDescription)); PyWinObject_FreeString(oc); |
From: <mha...@us...> - 2003-10-31 12:08:03
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv30156 Modified Files: PyACL.cpp Log Message: Fix #include case, and cast -1 to DWORD to avoid strict warning. Index: PyACL.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyACL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyACL.cpp 12 Mar 2003 12:42:35 -0000 1.4 --- PyACL.cpp 31 Oct 2003 12:08:00 -0000 1.5 *************** *** 9,13 **** #include "PySecurityObjects.h" #include "accctrl.h" ! #include "Aclapi.h" // @pymethod <o PyACL>|pywintypes|ACL|Creates a new ACL object --- 9,13 ---- #include "PySecurityObjects.h" #include "accctrl.h" ! #include "aclapi.h" // @pymethod <o PyACL>|pywintypes|ACL|Creates a new ACL object *************** *** 67,71 **** BOOL ret = TRUE; DWORD aceind = 0; ! DWORD ace_insert_ind = -1; DWORD aclsize=pacl->AclSize; DWORD acecount=pacl->AceCount; --- 67,71 ---- BOOL ret = TRUE; DWORD aceind = 0; ! DWORD ace_insert_ind = (DWORD)-1; DWORD aclsize=pacl->AclSize; DWORD acecount=pacl->AceCount; |
From: <mha...@us...> - 2003-10-31 12:07:07
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv30072 Modified Files: PyIID.cpp Log Message: Cast -1 to DWORD to avoid strict warnings. Index: PyIID.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyIID.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIID.cpp 19 Nov 2002 10:56:26 -0000 1.4 --- PyIID.cpp 31 Oct 2003 12:07:04 -0000 1.5 *************** *** 99,103 **** } char *szResult; ! if (!PyWin_WCHAR_AsString(oleRes, -1, &szResult)) return NULL; PyObject *rc = PyString_FromString(szResult); --- 99,103 ---- } char *szResult; ! if (!PyWin_WCHAR_AsString(oleRes, (DWORD)-1, &szResult)) return NULL; PyObject *rc = PyString_FromString(szResult); |
From: <mha...@us...> - 2003-10-31 12:06:12
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv29812 Modified Files: win32apimodule.cpp Log Message: Fix case of #include, and avoid going via a double to get a long int for RegQueryInfoKey() Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** win32apimodule.cpp 26 Oct 2003 03:59:51 -0000 1.29 --- win32apimodule.cpp 31 Oct 2003 12:06:07 -0000 1.30 *************** *** 27,31 **** #define SECURITY_WIN32 // required by below ! #include "Security.h" // for GetUserNameEx #define DllExport _declspec(dllexport) --- 27,31 ---- #define SECURITY_WIN32 // required by below ! #include "security.h" // for GetUserNameEx #define DllExport _declspec(dllexport) *************** *** 560,564 **** return NULL; } ! for (int i=0;i<len;i++) { PyObject *subObject = PySequence_GetItem(obInserts, i); if (subObject==NULL) { --- 560,565 ---- return NULL; } ! int i; ! for (i=0;i<len;i++) { PyObject *subObject = PySequence_GetItem(obInserts, i); if (subObject==NULL) { *************** *** 2538,2548 **** } - static double LI2double(LARGE_INTEGER *li) - { - double d=li->LowPart; - d=d+pow(2.0,32.0)*li->HighPart; - return d; - } - // @pymethod (int, int, long)|win32api|RegQueryInfoKey|Returns the number of // subkeys, the number of values a key has, --- 2539,2542 ---- *************** *** 2557,2561 **** DWORD nSubKeys, nValues; FILETIME ft; - LARGE_INTEGER li; PyObject *l; --- 2551,2554 ---- *************** *** 2574,2580 **** )!=ERROR_SUCCESS) return ReturnAPIError("RegQueryInfoKey", rc); ! li.LowPart=ft.dwLowDateTime; ! li.HighPart=ft.dwHighDateTime; ! if (!(l=PyLong_FromDouble(LI2double(&li)))) return NULL; PyObject *ret = Py_BuildValue("iiO",nSubKeys,nValues,l); --- 2567,2571 ---- )!=ERROR_SUCCESS) return ReturnAPIError("RegQueryInfoKey", rc); ! if (!(l=PyLong_FromTwoInts(ft.dwHighDateTime, ft.dwLowDateTime))) return NULL; PyObject *ret = Py_BuildValue("iiO",nSubKeys,nValues,l); |
From: <mha...@us...> - 2003-10-31 11:42:06
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv26712 Modified Files: PythonCOM.h Log Message: Cast default '-1' arg value to unsigned. Index: PythonCOM.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PythonCOM.h 31 Oct 2003 06:55:13 -0000 1.14 --- PythonCOM.h 31 Oct 2003 11:42:03 -0000 1.15 *************** *** 270,274 **** // Uses the HRESULT and an EXCEPINFO structure to create and // set a pythoncom.com_error. ! PYCOM_EXPORT PyObject* PyCom_BuildPyExceptionFromEXCEPINFO(HRESULT hr, EXCEPINFO *pexcepInfo, UINT nArgErr = -1); // Sets a pythoncom.internal_error - no one should ever see these! --- 270,274 ---- // Uses the HRESULT and an EXCEPINFO structure to create and // set a pythoncom.com_error. ! PYCOM_EXPORT PyObject* PyCom_BuildPyExceptionFromEXCEPINFO(HRESULT hr, EXCEPINFO *pexcepInfo, UINT nArgErr = (UINT)-1); // Sets a pythoncom.internal_error - no one should ever see these! |
From: <mha...@us...> - 2003-10-31 09:39:43
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv7782 Modified Files: PyIDispatch.cpp Log Message: Cast -1 error/missing value to UINT to prevent compiler warnings. Index: PyIDispatch.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIDispatch.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PyIDispatch.cpp 24 Oct 2003 04:32:43 -0000 1.6 --- PyIDispatch.cpp 31 Oct 2003 09:39:39 -0000 1.7 *************** *** 18,22 **** if ( einfo->scode != DISP_E_TYPEMISMATCH && einfo->scode != DISP_E_PARAMNOTFOUND ) ! nArgErr = -1; else nArgErr = cArgs - nArgErr; /* convert to usable index */ --- 18,22 ---- if ( einfo->scode != DISP_E_TYPEMISMATCH && einfo->scode != DISP_E_PARAMNOTFOUND ) ! nArgErr = (UINT)-1; else nArgErr = cArgs - nArgErr; /* convert to usable index */ *************** *** 28,32 **** { if ( hr != DISP_E_TYPEMISMATCH && hr != DISP_E_PARAMNOTFOUND ) ! nArgErr = -1; else nArgErr = cArgs - nArgErr; /* convert to usable index */ --- 28,32 ---- { if ( hr != DISP_E_TYPEMISMATCH && hr != DISP_E_PARAMNOTFOUND ) ! nArgErr =(UINT)-1; else nArgErr = cArgs - nArgErr; /* convert to usable index */ *************** *** 618,622 **** PyCom_FreeUntypedDISPPARAMS(&dispparams); ! if ( HandledDispatchFailure(hr, &excepInfo, -1, dispparams.cArgs) ) { if ( pVarResultUse ) --- 618,622 ---- PyCom_FreeUntypedDISPPARAMS(&dispparams); ! if ( HandledDispatchFailure(hr, &excepInfo, (UINT)-1, dispparams.cArgs) ) { if ( pVarResultUse ) |
From: <mha...@us...> - 2003-10-31 09:36:55
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv7302 Modified Files: PyComHelpers.cpp Log Message: No newline at end of file (bloody Unix <wink>) Index: PyComHelpers.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyComHelpers.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyComHelpers.cpp 30 Oct 2003 06:28:28 -0000 1.4 --- PyComHelpers.cpp 31 Oct 2003 09:36:52 -0000 1.5 *************** *** 352,354 **** Py_XDECREF(obatime); return ret; ! } \ No newline at end of file --- 352,354 ---- Py_XDECREF(obatime); return ret; ! } |
From: <mha...@us...> - 2003-10-31 07:21:01
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv20460 Modified Files: PyIEnumGUID.cpp PyIServiceProvider.cpp Log Message: '#endif SYMBOL' -> '#endif // SYMBOL' Index: PyIEnumGUID.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumGUID.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumGUID.cpp 19 Nov 1999 04:03:23 -0000 1.2 --- PyIEnumGUID.cpp 31 Oct 2003 07:20:58 -0000 1.3 *************** *** 146,148 **** GET_PYCOM_CTOR(PyIEnumGUID)); ! #endif NO_PYCOM_IENUMGUID --- 146,148 ---- GET_PYCOM_CTOR(PyIEnumGUID)); ! #endif // NO_PYCOM_IENUMGUID Index: PyIServiceProvider.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIServiceProvider.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIServiceProvider.cpp 19 Nov 1999 04:03:23 -0000 1.2 --- PyIServiceProvider.cpp 31 Oct 2003 07:20:58 -0000 1.3 *************** *** 88,90 **** } ! #endif NO_PYCOM_ISERVICEPROVIDER --- 88,90 ---- } ! #endif // NO_PYCOM_ISERVICEPROVIDER |
From: <mha...@us...> - 2003-10-31 07:18:23
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv20145 Modified Files: PyICatRegister.h PyIPersist.h PyIPersistStream.h PyIPersistStreamInit.h Log Message: '#endif SYMBOL' -> '#endif // SYMBOL' Index: PyICatRegister.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyICatRegister.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyICatRegister.h 1 Sep 1999 23:04:13 -0000 1.1 --- PyICatRegister.h 31 Oct 2003 07:18:20 -0000 1.2 *************** *** 19,21 **** ~PyICatRegister(); }; ! #endif NO_PYCOM_ICATREGISTER --- 19,21 ---- ~PyICatRegister(); }; ! #endif // NO_PYCOM_ICATREGISTER Index: PyIPersist.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIPersist.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIPersist.h 1 Sep 1999 23:04:14 -0000 1.1 --- PyIPersist.h 31 Oct 2003 07:18:20 -0000 1.2 *************** *** 37,39 **** #pragma warning(default : 4275 ) ! #endif __PYIPERSIST_H__ --- 37,39 ---- #pragma warning(default : 4275 ) ! #endif // __PYIPERSIST_H__ Index: PyIPersistStream.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIPersistStream.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIPersistStream.h 15 Nov 1999 22:44:41 -0000 1.2 --- PyIPersistStream.h 31 Oct 2003 07:18:20 -0000 1.3 *************** *** 49,51 **** }; ! #endif __PYIPERSISTSTREAM_H__ --- 49,51 ---- }; ! #endif // __PYIPERSISTSTREAM_H__ Index: PyIPersistStreamInit.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIPersistStreamInit.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIPersistStreamInit.h 15 Nov 1999 22:44:41 -0000 1.2 --- PyIPersistStreamInit.h 31 Oct 2003 07:18:20 -0000 1.3 *************** *** 45,47 **** }; ! #endif __PYIPERSISTSTREAMINIT_H__ --- 45,47 ---- }; ! #endif // __PYIPERSISTSTREAMINIT_H__ |
From: <mha...@us...> - 2003-10-31 06:58:52
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/test In directory sc8-pr-cvs1:/tmp/cvs-serv17868 Modified Files: testShellFolder.py Log Message: Demonstrate/test PyIShellFolder's __iter__. Index: testShellFolder.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/test/testShellFolder.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testShellFolder.py 8 Oct 2003 05:47:57 -0000 1.1 --- testShellFolder.py 31 Oct 2003 06:58:48 -0000 1.2 *************** *** 3,11 **** sf = shell.SHGetDesktopFolder() ! print "sf is", sf enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN) ! print "enum is", enum for i in enum: ! name = sf.GetDisplayNameOf(i, SHGDN_NORMAL) print name - --- 3,21 ---- sf = shell.SHGetDesktopFolder() ! print "Shell Folder is", sf ! ! names = [] ! for i in sf: # Magically calls EnumObjects ! name = sf.GetDisplayNameOf(i, SHGDN_NORMAL) ! names.append(name) ! ! # And get the enumerator manually enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN) ! num = 0 for i in enum: ! num += 1 ! if num != len(names): ! print "Should have got the same number of names!?" ! print "Found", len(names), "items on the desktop" ! for name in names: print name |
From: <mha...@us...> - 2003-10-31 06:58:16
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1:/tmp/cvs-serv17780 Modified Files: PyIEnumIDList.cpp PyIEnumIDList.h PyIShellFolder.cpp PyIShellFolder.h Log Message: Allow PyIShellFolder to automatically provide EnumObject() as an iterator. Index: PyIEnumIDList.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumIDList.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumIDList.cpp 23 Oct 2003 23:44:41 -0000 1.2 --- PyIEnumIDList.cpp 31 Oct 2003 06:58:13 -0000 1.3 *************** *** 26,29 **** --- 26,36 ---- PyObject * + PyIEnumIDList::iter() + { + Py_INCREF(this); + return this; + } + + PyObject * PyIEnumIDList::iternext() { Index: PyIEnumIDList.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumIDList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumIDList.h 23 Oct 2003 23:44:41 -0000 1.2 --- PyIEnumIDList.h 31 Oct 2003 06:58:13 -0000 1.3 *************** *** 12,15 **** --- 12,16 ---- static PyComEnumTypeObject type; + virtual PyObject *iter(); virtual PyObject *iternext(); Index: PyIShellFolder.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellFolder.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIShellFolder.cpp 6 Oct 2003 12:47:57 -0000 1.1 --- PyIShellFolder.cpp 31 Oct 2003 06:58:13 -0000 1.2 *************** *** 25,28 **** --- 25,46 ---- } + // @pymethod |PyIShellFolder|__iter__|Enumerates all objects in this folder. + // @comm Calls EnumObjects(SHCONTF_FOLDERS\|SHCONTF_NONFOLDERS\|SHCONTF_INCLUDEHIDDEN), + // returning PIDL objects. + PyObject * + PyIShellFolder::iter() + { + IShellFolder *pISF = GetI(this); + DWORD flags = SHCONTF_FOLDERS|SHCONTF_NONFOLDERS|SHCONTF_INCLUDEHIDDEN; + IEnumIDList * ppeidl; + HRESULT hr; + PY_INTERFACE_PRECALL; + hr = pISF->EnumObjects( 0, flags, &ppeidl ); + PY_INTERFACE_POSTCALL; + if ( FAILED(hr) ) + return PyCom_BuildPyException(hr, pISF, IID_IShellFolder ); + return PyCom_PyObjectFromIUnknown(ppeidl, IID_IEnumIDList, FALSE); + } + // @pymethod |PyIShellFolder|ParseDisplayName|Description of ParseDisplayName. PyObject *PyIShellFolder::ParseDisplayName(PyObject *self, PyObject *args) *************** *** 393,397 **** }; ! PyComTypeObject PyIShellFolder::type("PyIShellFolder", &PyIUnknown::type, sizeof(PyIShellFolder), --- 411,416 ---- }; ! // @pymeth __iter__|Enumerates all objects in this folder. ! PyComEnumProviderTypeObject PyIShellFolder::type("PyIShellFolder", &PyIUnknown::type, sizeof(PyIShellFolder), Index: PyIShellFolder.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellFolder.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIShellFolder.h 6 Oct 2003 12:47:57 -0000 1.1 --- PyIShellFolder.h 31 Oct 2003 06:58:13 -0000 1.2 *************** *** 10,14 **** MAKE_PYCOM_CTOR(PyIShellFolder); static IShellFolder *GetI(PyObject *self); ! static PyComTypeObject type; // The Python methods --- 10,16 ---- MAKE_PYCOM_CTOR(PyIShellFolder); static IShellFolder *GetI(PyObject *self); ! static PyComEnumProviderTypeObject type; ! ! virtual PyObject *iter(); // The Python methods |
From: <mha...@us...> - 2003-10-31 06:55:16
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv17359/include Modified Files: PyIEnumFORMATETC.h PyIEnumVARIANT.h PythonCOM.h Log Message: Add PyComEnumProviderTypeObject, for objects that can return (but not actually be) an iterator. Index: PyIEnumFORMATETC.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIEnumFORMATETC.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIEnumFORMATETC.h 23 Oct 2003 23:42:02 -0000 1.3 --- PyIEnumFORMATETC.h 31 Oct 2003 06:55:13 -0000 1.4 *************** *** 12,15 **** --- 12,16 ---- static PyComEnumTypeObject type; + virtual PyObject *iter(); virtual PyObject *iternext(); Index: PyIEnumVARIANT.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PyIEnumVARIANT.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIEnumVARIANT.h 23 Oct 2003 23:42:02 -0000 1.4 --- PyIEnumVARIANT.h 31 Oct 2003 06:55:13 -0000 1.5 *************** *** 12,15 **** --- 12,16 ---- static PyComEnumTypeObject type; + virtual PyObject *iter(); virtual PyObject *iternext(); Index: PythonCOM.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PythonCOM.h 30 Oct 2003 06:30:38 -0000 1.13 --- PythonCOM.h 31 Oct 2003 06:55:13 -0000 1.14 *************** *** 154,157 **** --- 154,165 ---- }; + // A type used for interfaces that can automatically provide enumerators + // (ie, they themselves aren't enumerable, but do have a suitable default + // method that returns a PyIEnum object + class PYCOM_EXPORT PyComEnumProviderTypeObject : public PyComTypeObject { + public: + PyComEnumProviderTypeObject( const char *name, PyComTypeObject *pBaseType, int typeSize, struct PyMethodDef* methodList, PyIUnknown* (* thector)(IUnknown *) ); + }; + // A type used for PyIEnum interfaces class PYCOM_EXPORT PyComEnumTypeObject : public PyComTypeObject { *************** *** 171,175 **** virtual PyObject *repr(); virtual int compare(PyObject *other) {return (int)this-int(other);} ! virtual PyObject *iter() {Py_INCREF(this);return this;} virtual PyObject *iternext(); --- 179,183 ---- virtual PyObject *repr(); virtual int compare(PyObject *other) {return (int)this-int(other);} ! virtual PyObject *iter(); virtual PyObject *iternext(); |
From: <mha...@us...> - 2003-10-31 06:55:16
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv17359/extensions Modified Files: PyIEnumFORMATETC.cpp PyIEnumVARIANT.cpp Log Message: Add PyComEnumProviderTypeObject, for objects that can return (but not actually be) an iterator. Index: PyIEnumFORMATETC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumFORMATETC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIEnumFORMATETC.cpp 23 Oct 2003 23:42:02 -0000 1.3 --- PyIEnumFORMATETC.cpp 31 Oct 2003 06:55:12 -0000 1.4 *************** *** 30,33 **** --- 30,39 ---- } + PyObject * + PyIEnumFORMATETC::iter() + { + Py_INCREF(this); + return this; + } PyObject * Index: PyIEnumVARIANT.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIEnumVARIANT.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIEnumVARIANT.cpp 23 Oct 2003 23:42:02 -0000 1.4 --- PyIEnumVARIANT.cpp 31 Oct 2003 06:55:12 -0000 1.5 *************** *** 14,17 **** --- 14,24 ---- PyObject * + PyIEnumVARIANT::iter() + { + Py_INCREF(this); + return this; + } + + PyObject * PyIEnumVARIANT::iternext() { |
From: <mha...@us...> - 2003-10-31 06:55:15
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv17359 Modified Files: MiscTypes.cpp PyIBase.cpp Log Message: Add PyComEnumProviderTypeObject, for objects that can return (but not actually be) an iterator. Index: MiscTypes.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/MiscTypes.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MiscTypes.cpp 23 Oct 2003 23:42:02 -0000 1.4 --- MiscTypes.cpp 31 Oct 2003 06:55:12 -0000 1.5 *************** *** 118,121 **** --- 118,130 ---- } + // Our type for IEnum provider interfaces + PyComEnumProviderTypeObject::PyComEnumProviderTypeObject( const char *name, PyComTypeObject *pBase, int typeSize, struct PyMethodDef* methodList, PyIUnknown * (* thector)(IUnknown *)) : + PyComTypeObject( name, pBase, typeSize, methodList, thector) + { + tp_iter = PyIBase::iter; + // tp_iternext remains NULL + tp_flags |= Py_TPFLAGS_HAVE_ITER; + } + ///////////////////////////////////////////////////////////////////////////// // class PyOleEmpty Index: PyIBase.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIBase.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIBase.cpp 23 Oct 2003 23:42:02 -0000 1.4 --- PyIBase.cpp 31 Oct 2003 06:55:12 -0000 1.5 *************** *** 54,57 **** --- 54,65 ---- return Py_FindMethodInChain(&((PyComTypeObject *)ob_type)->chain, this, name); } + + PyObject * + PyIBase::iter() + { + return PyErr_Format(PyExc_RuntimeError, + "iter must be overridden by objects supporting enumeration (type '%s').", ob_type->tp_name); + } + PyObject * PyIBase::iternext() |
From: <mha...@us...> - 2003-10-31 06:53:39
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv17201 Modified Files: PyIUnknown.cpp Log Message: Use gcc exception semantics for MAINWIN too (maybe this should be checking gcc?) Index: PyIUnknown.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIUnknown.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyIUnknown.cpp 23 Oct 2003 07:29:40 -0000 1.7 --- PyIUnknown.cpp 31 Oct 2003 06:53:36 -0000 1.8 *************** *** 145,149 **** ob->m_obj = NULL; } ! #ifdef __MINGW32__ catch(...) #else --- 145,149 ---- ob->m_obj = NULL; } ! #if defined(__MINGW32__) || defined(MAINWIN) catch(...) #else |
From: <mha...@us...> - 2003-10-31 04:58:21
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv3180 Modified Files: PyUnicode.cpp Log Message: Correct almost every use of MultiByteToWideChar - the last param is the number of wide chars, not bytes. Index: PyUnicode.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PyUnicode.cpp 6 Apr 2003 23:47:05 -0000 1.15 --- PyUnicode.cpp 31 Oct 2003 04:58:18 -0000 1.16 *************** *** 26,36 **** if (buf==NULL) return FALSE; ! /* compute the max possible size ("size" may contain multi-byte chars) */ ! int wideSize = cch*2; ! ! *ppResult = (LPWSTR)CoTaskMemAlloc(wideSize); if (*ppResult) /* convert and get the final character size */ ! cch = MultiByteToWideChar(CP_ACP, 0, buf, cch, *ppResult, wideSize); if (*ppResult && pResultLen) *pResultLen = cch; } else if (PyUnicode_Check(stringObject)) { --- 26,38 ---- if (buf==NULL) return FALSE; ! /* We assume that we dont need more 'wide characters' for the result ! then the number of bytes in the input. Often we ! will need less, as the input may contain multi-byte chars, but we ! should never need more ! */ ! *ppResult = (LPWSTR)CoTaskMemAlloc(cch*sizeof(WCHAR)); if (*ppResult) /* convert and get the final character size */ ! cch = MultiByteToWideChar(CP_ACP, 0, buf, cch, *ppResult, cch); if (*ppResult && pResultLen) *pResultLen = cch; } else if (PyUnicode_Check(stringObject)) { *************** *** 891,898 **** if (buf==NULL) return FALSE; ! /* compute the max possible size ("size" may contain multi-byte chars) */ ! int wideSize = size*2; ! LPWSTR wstr = (LPWSTR)malloc(wideSize); if (wstr==NULL) { PyErr_SetString(PyExc_MemoryError, "No memory for wide string buffer"); --- 893,903 ---- if (buf==NULL) return FALSE; ! /* We assume that we dont need more 'wide characters' for the result ! then the number of bytes in the input. Often we ! will need less, as the input may contain multi-byte chars, but we ! should never need more ! */ ! LPWSTR wstr = (LPWSTR)malloc(size*sizeof(WCHAR)); if (wstr==NULL) { PyErr_SetString(PyExc_MemoryError, "No memory for wide string buffer"); *************** *** 900,904 **** } /* convert and get the final character size */ ! size = MultiByteToWideChar(CP_ACP, 0, buf, size, wstr, wideSize); *pResult = SysAllocStringLen(wstr, size); if (*pResult==NULL) --- 905,909 ---- } /* convert and get the final character size */ ! size = MultiByteToWideChar(CP_ACP, 0, buf, size, wstr, size); *pResult = SysAllocStringLen(wstr, size); if (*pResult==NULL) *************** *** 963,970 **** if (buf==NULL) return FALSE; ! /* compute the max possible size ("size" may contain multi-byte chars) */ ! int wideSize = size*2; ! ! *pResult = (LPWSTR)PyMem_Malloc(wideSize+sizeof(WCHAR)); if (*pResult==NULL) { PyErr_SetString(PyExc_MemoryError, "No memory for wide string buffer"); --- 968,977 ---- if (buf==NULL) return FALSE; ! /* We assume that we dont need more 'wide characters' for the result ! then the number of bytes in the input. Often we ! will need less, as the input may contain multi-byte chars, but we ! should never need more ! */ ! *pResult = (LPWSTR)PyMem_Malloc((size+1)*sizeof(WCHAR)); if (*pResult==NULL) { PyErr_SetString(PyExc_MemoryError, "No memory for wide string buffer"); *************** *** 972,976 **** } /* convert and get the final character size */ ! resultLen = MultiByteToWideChar(CP_ACP, 0, buf, size, *pResult, wideSize); /* terminate the string */ (*pResult)[resultLen] = L'\0'; --- 979,983 ---- } /* convert and get the final character size */ ! resultLen = MultiByteToWideChar(CP_ACP, 0, buf, size, *pResult, size); /* terminate the string */ (*pResult)[resultLen] = L'\0'; |
From: <mha...@us...> - 2003-10-31 04:41:04
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv1377 Modified Files: PyStorage.cpp Log Message: Allow a build to completely exclude StgOpenStorageEx Index: PyStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyStorage.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyStorage.cpp 31 Oct 2003 04:34:36 -0000 1.4 --- PyStorage.cpp 31 Oct 2003 04:41:00 -0000 1.5 *************** *** 157,160 **** --- 157,161 ---- PyObject *pythoncom_StgOpenStorageEx(PyObject *self, PyObject *args) { + #ifndef NO_PYCOM_STGOPENSTORAGEEX typedef HRESULT (WINAPI *PFNStgOpenStorageEx)(WCHAR *, DWORD, DWORD, DWORD, STGOPTIONS *, void *, REFIID, void **);; *************** *** 204,207 **** --- 205,211 ---- return PyCom_BuildPyException(err); return PyCom_PyObjectFromIUnknown((IUnknown *)intptr, riid, FALSE); + #else + return PyErr_Format(PyExc_NotImplementedError,"StgOpenStorageEx not supported by this version of Windows"); + #endif // NO_PYCOM_STGOPENSTORAGEEX } |
From: <mha...@us...> - 2003-10-31 04:34:41
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv751 Modified Files: PyStorage.cpp PythonCOM.cpp Log Message: Reduce footprint of StgOpenStorageEx, as I will soon be adding #ifdef wrappers to optionally exclude it from the build. Index: PyStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyStorage.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyStorage.cpp 30 Oct 2003 06:28:28 -0000 1.3 --- PyStorage.cpp 31 Oct 2003 04:34:36 -0000 1.4 *************** *** 7,14 **** #include "PythonCOMServer.h" - - HRESULT (WINAPI *myStgOpenStorageEx)(WCHAR *, DWORD, DWORD, DWORD, - STGOPTIONS *, void *, REFIID, void **); - // @doc --- 7,10 ---- *************** *** 161,168 **** PyObject *pythoncom_StgOpenStorageEx(PyObject *self, PyObject *args) { ! if (myStgOpenStorageEx==NULL){ ! PyErr_SetString(PyExc_NotImplementedError,"StgOpenStorageEx not supported by this version of Windows"); ! return NULL; } PyObject *obfname=NULL, *obriid=NULL, *obstgoptions=NULL; WCHAR *fname; --- 157,174 ---- PyObject *pythoncom_StgOpenStorageEx(PyObject *self, PyObject *args) { ! typedef HRESULT (WINAPI *PFNStgOpenStorageEx)(WCHAR *, DWORD, DWORD, DWORD, ! STGOPTIONS *, void *, REFIID, void **);; ! static PFNStgOpenStorageEx myStgOpenStorageEx = NULL; ! if (myStgOpenStorageEx==NULL) { // Haven't tried to fetch it yet. ! myStgOpenStorageEx = (PFNStgOpenStorageEx)-1; ! HMODULE hmodule=GetModuleHandle("Ole32.dll"); ! if (hmodule!=NULL){ ! FARPROC fp = GetProcAddress(hmodule,"StgOpenStorageEx"); ! if (fp!=NULL) ! myStgOpenStorageEx=(PFNStgOpenStorageEx)fp; } + } + if (myStgOpenStorageEx == (PFNStgOpenStorageEx)-1) + return PyErr_Format(PyExc_NotImplementedError,"StgOpenStorageEx not supported by this version of Windows"); PyObject *obfname=NULL, *obriid=NULL, *obstgoptions=NULL; WCHAR *fname; Index: PythonCOM.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** PythonCOM.cpp 30 Oct 2003 06:28:28 -0000 1.24 --- PythonCOM.cpp 31 Oct 2003 04:34:36 -0000 1.25 *************** *** 16,22 **** #include "PyFactory.h" - extern HRESULT (WINAPI *myStgOpenStorageEx)(WCHAR *, DWORD, DWORD, DWORD, - STGOPTIONS *, void *, REFIID, void **); - extern int PyCom_RegisterCoreIIDs(PyObject *dict); --- 16,19 ---- *************** *** 1888,1900 **** // PyDict_SetItemString(dict,"FMTID_MediaFileSummaryInfo",obfmtid); // Py_DECREF(obfmtid); - - myStgOpenStorageEx=NULL; - HMODULE hmodule=GetModuleHandle("Ole32.dll"); - if (hmodule!=NULL){ - FARPROC fp = GetProcAddress(hmodule,"StgOpenStorageEx"); - if (fp!=NULL) - myStgOpenStorageEx=(HRESULT (WINAPI *)(WCHAR *, DWORD, DWORD, DWORD, - STGOPTIONS *, void *, REFIID, void **))(fp); - } // @prop int|dcom|1 if the system is DCOM aware, else 0. Only Win95 without DCOM extensions should return 0 --- 1885,1888 ---- |
From: <mha...@us...> - 2003-10-31 03:11:16
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv21159 Modified Files: pywintypes.py Log Message: Remove unused variable. Index: pywintypes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/pywintypes.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pywintypes.py 26 Oct 2003 03:52:56 -0000 1.4 --- pywintypes.py 31 Oct 2003 03:11:13 -0000 1.5 *************** *** 25,29 **** else: raise ImportError, "Module '%s' isn't in frozen sys.path directories" % modname - h = None else: if os.path.isfile(os.path.join(sys.prefix, filename)): --- 25,28 ---- |