pywin32-checkins Mailing List for Python for Windows Extensions (Page 41)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2008-12-06 02:17:16
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin Modified Files: Tag: py3k ddeconv.cpp ddemodule.h stddde.cpp win32ui.h win32uiExt.h win32uimodule.cpp win32virt.cpp Log Message: merge various fixes and changes from the trunk Index: win32ui.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ui.h,v retrieving revision 1.7.2.4 retrieving revision 1.7.2.5 diff -C2 -d -r1.7.2.4 -r1.7.2.5 *** win32ui.h 1 Oct 2008 13:50:54 -0000 1.7.2.4 --- win32ui.h 6 Dec 2008 01:48:26 -0000 1.7.2.5 *************** *** 313,318 **** BOOL retval( PyObject* &ret ); BOOL retval( CREATESTRUCT &cs ); ! BOOL retval( char * &ret ); ! BOOL retval( WCHAR *&ret ); BOOL retval( CString &ret ); BOOL retval( MSG *msg); --- 313,319 ---- BOOL retval( PyObject* &ret ); BOOL retval( CREATESTRUCT &cs ); ! // Note the lack of 'char *' or 'WCHAR *' support - this makes it ! // too hard for memory management when converting between strings and ! // unicode. Use the CString one instead. BOOL retval( CString &ret ); BOOL retval( MSG *msg); Index: ddemodule.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/ddemodule.h,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** ddemodule.h 29 Aug 2008 05:53:28 -0000 1.1.4.1 --- ddemodule.h 6 Dec 2008 01:48:26 -0000 1.1.4.2 *************** *** 24,28 **** }; - template <class T> class PythonDDETopicFramework : public T --- 24,27 ---- *************** *** 39,43 **** return !rc; } ! virtual BOOL NSRequest(const TCHAR * szItem, void** ppData, DWORD* dwSize) { PyObject *args = Py_BuildValue("(N)", PyWinObject_FromTCHAR(szItem)); --- 38,42 ---- return !rc; } ! virtual BOOL NSRequest(const TCHAR *szItem, CDDEAllocator &allocr) { PyObject *args = Py_BuildValue("(N)", PyWinObject_FromTCHAR(szItem)); *************** *** 45,55 **** CVirtualHelper helper("Request", this); if (helper.call_args(args) ) { ! TCHAR * strret ; if (helper.retval(strret)) { ! PyObject * look ; ! helper.retval(look) ; ! *dwSize = PyObject_Length(look)+1 ; ! *ppData = (void*)strret ; ! return TRUE ; } } --- 44,52 ---- CVirtualHelper helper("Request", this); if (helper.call_args(args) ) { ! CString strret; if (helper.retval(strret)) { ! // seems strange we can't use DdeCreateStringHandle, but that is ! // a different handle type ! return allocr.Alloc(strret); } } Index: win32uiExt.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiExt.h,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -C2 -d -r1.14.2.1 -r1.14.2.2 *** win32uiExt.h 29 Aug 2008 05:53:29 -0000 1.14.2.1 --- win32uiExt.h 6 Dec 2008 01:48:26 -0000 1.14.2.2 *************** *** 828,834 **** // @xref <om PyCMDIChildWnd.GetMessageString> if (helper.call((int &)nID)) { ! char *ret; ! if (helper.retval(ret)) ! rMessage = ret; } else --- 828,832 ---- // @xref <om PyCMDIChildWnd.GetMessageString> if (helper.call((int &)nID)) { ! helper.retval(rMessage); } else Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.39.2.7 retrieving revision 1.39.2.8 diff -C2 -d -r1.39.2.7 -r1.39.2.8 *** win32uimodule.cpp 26 Nov 2008 07:17:38 -0000 1.39.2.7 --- win32uimodule.cpp 6 Dec 2008 01:48:26 -0000 1.39.2.8 *************** *** 789,792 **** --- 789,808 ---- } + // @pymethod |win32ui|DisplayTraceback|Displays a traceback in a dialog box. + static PyObject * + ui_python_display_traceback( PyObject *self, PyObject *args ) + { + PyObject *obTitle = Py_None; + PyObject *t, *v, *tb; + if (!PyArg_ParseTuple(args, "(OOO)|O:DisplayTraceback", &t, &v, &tb, &obTitle)) + return NULL; + TCHAR *title; + if (!PyWinObject_AsTCHAR(obTitle, &title, TRUE)) + return NULL; + DisplayPythonTraceback(t, v, tb, title); + PyWinObject_FreeTCHAR(title); + RETURN_NONE; + } + // @pymethod |win32ui|OutputDebugString|Sends a string to the Windows debugging device. static PyObject * *************** *** 1899,1902 **** --- 1915,1919 ---- {"DestroyDebuggerThread", ui_destroy_debugger_thread, 1}, // @pymeth DestroyDebuggerThread|Cleans up the debugger thread. {"DoWaitCursor", ui_do_wait_cursor, 1}, // @pymeth DoWaitCursor|Changes the cursor to/from a wait cursor. + {"DisplayTraceback", ui_python_display_traceback, 1}, // @pymeth DisplayTraceback|Displays a traceback in a dialog box. {"Enable3dControls", ui_enable_3d_controls, 1 }, // @pymeth Enable3dControls|Enables 3d controls for the application. {"FindWindow", PyCWnd::FindWindow, 1}, // @pymeth FindWindow|Searches for the specified top-level window Index: stddde.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/stddde.cpp,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** stddde.cpp 29 Aug 2008 05:53:29 -0000 1.5.2.1 --- stddde.cpp 6 Dec 2008 01:48:26 -0000 1.5.2.2 *************** *** 178,182 **** } ! BOOL CDDEItem::Request(UINT wFmt, void** ppData, DWORD* pdwSize) { return FALSE; --- 178,182 ---- } ! BOOL CDDEItem::Request(UINT wFmt, CDDEAllocator &allocr) { return FALSE; *************** *** 184,188 **** //CT BEGIN ! BOOL CDDEItem::NSRequest(const TCHAR* szItem, void** ppData, DWORD* pdwSize) { return FALSE; --- 184,188 ---- //CT BEGIN ! BOOL CDDEItem::NSRequest(const TCHAR* szItem, CDDEAllocator &allocr) { return FALSE; *************** *** 240,250 **** } ! BOOL CDDEStringItem::Request(UINT wFmt, void** ppData, DWORD* pdwSize) { ASSERT(wFmt == CF_TEXT); ! ASSERT(ppData); ! *ppData = (void*)(const TCHAR*)m_strData; ! *pdwSize = m_strData.GetLength() + 1; // allow for the null ! return TRUE; } --- 240,247 ---- } ! BOOL CDDEStringItem::Request(UINT wFmt, CDDEAllocator &allocr) { ASSERT(wFmt == CF_TEXT); ! return allocr.Alloc(m_strData); } *************** *** 320,324 **** BOOL CDDETopic::Request(UINT wFmt, const TCHAR* pszItem, ! void** ppData, DWORD* pdwSize) { // --- 317,321 ---- BOOL CDDETopic::Request(UINT wFmt, const TCHAR* pszItem, ! CDDEAllocator &allocr) { // *************** *** 331,343 **** //CT BEGIN if (pItem->m_strName == "") { ! BOOL ret = NSRequest(pszItem, ppData, pdwSize); return ret ; } //CT END ! return pItem->Request(wFmt, ppData, pdwSize); } //CT BEGIN ! BOOL CDDETopic::NSRequest(const TCHAR * szItem, void** ppData, DWORD* dwsize) { return FALSE ; --- 328,340 ---- //CT BEGIN if (pItem->m_strName == "") { ! BOOL ret = NSRequest(pszItem, allocr); return ret ; } //CT END ! return pItem->Request(wFmt, allocr); } //CT BEGIN ! BOOL CDDETopic::NSRequest(const TCHAR *szItem, CDDEAllocator &allocr) { return FALSE ; *************** *** 542,551 **** } ! BOOL CDDEConv::Request(const TCHAR* pszItem, void** ppData, DWORD* pdwSize) { ASSERT(m_pServer); ASSERT(pszItem); - ASSERT(ppData); - ASSERT(pdwSize); CHSZ hszItem (m_pServer, pszItem); --- 539,546 ---- } ! BOOL CDDEConv::Request(const TCHAR* pszItem, CString &ret) { ASSERT(m_pServer); ASSERT(pszItem); CHSZ hszItem (m_pServer, pszItem); *************** *** 554,558 **** --- 549,557 ---- m_hConv, hszItem, + #if defined(UNICODE) + CF_UNICODETEXT, + #else CF_TEXT, + #endif XTYP_REQUEST, DDE_TIMEOUT, *************** *** 560,567 **** if (!hData) { - - // Failed - *pdwSize = 0; - *ppData = NULL; return FALSE; } --- 559,562 ---- *************** *** 570,581 **** // Copy the result data // ! ! BYTE* pData = ::DdeAccessData(hData, pdwSize); ! ASSERT(*pdwSize); ! *ppData = new char[*pdwSize]; ! ASSERT(*ppData); ! memcpy(*ppData, pData, *pdwSize); ::DdeUnaccessData(hData); ! return TRUE; } --- 565,578 ---- // Copy the result data // ! DWORD dwSize; ! BYTE* pData = ::DdeAccessData(hData, &dwSize); ! DWORD nChars = (dwSize / sizeof(TCHAR))-1; ! ret = CString((TCHAR *)pData, nChars); ::DdeUnaccessData(hData); ! // MSDN sez 'When an application has finished using the data handle ! // returned by DdeClientTransaction, the application should free the ! // handle by calling the DdeFreeDataHandle function.' - which would ! // be about now! ! ::DdeFreeDataHandle(hData); return TRUE; } *************** *** 693,697 **** IMPLEMENT_DYNCREATE(CDDESystemItem_TopicList, CDDESystemItem); ! BOOL CDDESystemItem_TopicList::Request(UINT wFmt, void** ppData, DWORD* pdwSize) { // --- 690,694 ---- IMPLEMENT_DYNCREATE(CDDESystemItem_TopicList, CDDESystemItem); ! BOOL CDDESystemItem_TopicList::Request(UINT wFmt, CDDEAllocator &allocr) { // *************** *** 728,740 **** // Set up the return info // ! ! *ppData = (void*)(const TCHAR*)strTopics; ! *pdwSize = strTopics.GetLength() + 1; // include room for the NULL ! return TRUE; } IMPLEMENT_DYNCREATE(CDDESystemItem_ItemList, CDDESystemItem); ! BOOL CDDESystemItem_ItemList::Request(UINT wFmt, void** ppData, DWORD* pdwSize) { // --- 725,734 ---- // Set up the return info // ! return allocr.Alloc(strTopics); } IMPLEMENT_DYNCREATE(CDDESystemItem_ItemList, CDDESystemItem); ! BOOL CDDESystemItem_ItemList::Request(UINT wFmt, CDDEAllocator &allocr) { // *************** *** 769,781 **** // Set up the return info // ! ! *ppData = (void*)(const TCHAR*)strItems; ! *pdwSize = strItems.GetLength() + 1; // include room for the NULL ! return TRUE; } IMPLEMENT_DYNCREATE(CDDESystemItem_FormatList, CDDESystemItem); ! BOOL CDDESystemItem_FormatList::Request(UINT wFmt, void** ppData, DWORD* pdwSize) { // --- 763,772 ---- // Set up the return info // ! return allocr.Alloc(strItems); } IMPLEMENT_DYNCREATE(CDDESystemItem_FormatList, CDDESystemItem); ! BOOL CDDESystemItem_FormatList::Request(UINT wFmt, CDDEAllocator &allocr) { // *************** *** 850,857 **** // Set up the return info // ! ! *ppData = (void*)(const TCHAR*)strFormats; ! *pdwSize = strFormats.GetLength() + 1; // include romm for the NULL ! return TRUE; } --- 841,845 ---- // Set up the return info // ! return allocr.Alloc(strFormats); } *************** *** 859,866 **** BOOL CDDEServerSystemTopic::Request(UINT wFmt, const TCHAR* pszItem, ! void** ppData, DWORD* pdwSize) { m_pServer->Status(_T("System topic request: %s"), pszItem); ! return CDDETopic::Request(wFmt, pszItem, ppData, pdwSize); } --- 847,854 ---- BOOL CDDEServerSystemTopic::Request(UINT wFmt, const TCHAR* pszItem, ! CDDEAllocator &allocr) { m_pServer->Status(_T("System topic request: %s"), pszItem); ! return CDDETopic::Request(wFmt, pszItem, allocr); } *************** *** 1694,1702 **** // a generic one for the topic // Status(_T("Request %s|%s"), (const TCHAR*)strTopic, (const TCHAR*)strItem); dwLength = 0; ! if (!Request(wFmt, strTopic, strItem, &pData, &dwLength)) { ! // // Nobody accepted the request --- 1682,1691 ---- // a generic one for the topic // + { // scope for locals. + CDDEAllocator allocr(m_dwDDEInstance, hszItem, wFmt, phReturnData); Status(_T("Request %s|%s"), (const TCHAR*)strTopic, (const TCHAR*)strItem); dwLength = 0; ! if (!Request(wFmt, strTopic, strItem, allocr)) { // // Nobody accepted the request *************** *** 1710,1725 **** } ! // ! // There is some data so build a DDE data object to return ! // ! ! *phReturnData = ::DdeCreateDataHandle(m_dwDDEInstance, ! (unsigned char*)pData, ! dwLength, ! 0, ! hszItem, ! wFmt, ! 0); ! break; --- 1699,1704 ---- } ! } // end locals scope ! // Data already setup via 'allocr' param, so we are done. break; *************** *** 1805,1809 **** BOOL CDDEServer::Request(UINT wFmt, const TCHAR* pszTopic, const TCHAR* pszItem, ! void** ppData, DWORD* pdwSize) { // --- 1784,1788 ---- BOOL CDDEServer::Request(UINT wFmt, const TCHAR* pszTopic, const TCHAR* pszItem, ! CDDEAllocator &allocr) { // *************** *** 1814,1818 **** if (!pTopic) return FALSE; ! return pTopic->Request(wFmt, pszItem, ppData, pdwSize); } --- 1793,1797 ---- if (!pTopic) return FALSE; ! return pTopic->Request(wFmt, pszItem, allocr); } Index: win32virt.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32virt.cpp,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** win32virt.cpp 29 Aug 2008 05:53:30 -0000 1.6.2.1 --- win32virt.cpp 6 Dec 2008 01:48:26 -0000 1.6.2.2 *************** *** 545,580 **** } - BOOL CVirtualHelper::retval( char *&ret ) - { - ASSERT(retVal); - if (!retVal) - return FALSE; // failed - assume didnt work in non debug - if (retVal==Py_None) { - ret = NULL; - return TRUE; - } - CEnterLeavePython _celp; - ret = PyString_AsString(retVal); - if (ret == NULL) { - gui_print_error(); - return FALSE; - } - return TRUE; - } - - BOOL CVirtualHelper::retval(WCHAR *&ret ) - { - ASSERT(retVal); - if (!retVal) - return FALSE; // failed - assume didnt work in non debug - CEnterLeavePython _celp; - // ??? This leaks memory, but this overload is not actually used anywhere ??? - if (!PyWinObject_AsWCHAR(retVal, &ret, TRUE)){ - gui_print_error(); - return FALSE; - } - return TRUE; - } - BOOL CVirtualHelper::retval( CString &ret ) { --- 545,548 ---- Index: ddeconv.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/ddeconv.cpp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** ddeconv.cpp 29 Aug 2008 05:53:28 -0000 1.1.4.1 --- ddeconv.cpp 6 Dec 2008 01:48:26 -0000 1.1.4.2 *************** *** 82,95 **** if (!PyWinObject_AsTCHAR(obCmd, &szCmd, FALSE)) return NULL; GUI_BGN_SAVE; ! void *ppData ; ! DWORD pdwSize ; ! BOOL ok = pConv->Request(szCmd, &ppData, &pdwSize); GUI_END_SAVE; PyWinObject_FreeTCHAR(szCmd); if (!ok) RETURN_DDE_ERR("Request failed"); ! PyObject * result = PyWinObject_FromTCHAR((TCHAR *)ppData); ! free(ppData) ; return result ; } --- 82,93 ---- if (!PyWinObject_AsTCHAR(obCmd, &szCmd, FALSE)) return NULL; + CString ret; GUI_BGN_SAVE; ! BOOL ok = pConv->Request(szCmd, ret); GUI_END_SAVE; PyWinObject_FreeTCHAR(szCmd); if (!ok) RETURN_DDE_ERR("Request failed"); ! PyObject * result = PyWinObject_FromTCHAR((const TCHAR *)ret); return result ; } |
From: Mark H. <mha...@us...> - 2008-12-06 02:17:12
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631 Modified Files: Tag: py3k CHANGES.txt pywin32_postinstall.py setup.py setup3.py Log Message: merge various fixes and changes from the trunk Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.25.2.3 retrieving revision 1.25.2.4 diff -C2 -d -r1.25.2.3 -r1.25.2.4 *** pywin32_postinstall.py 27 Nov 2008 11:31:03 -0000 1.25.2.3 --- pywin32_postinstall.py 6 Dec 2008 01:48:26 -0000 1.25.2.4 *************** *** 4,11 **** # and creates a pth file import os, sys, glob, shutil, time ! try: ! import _winreg as winreg ! except ImportError: ! import winreg # Send output somewhere so it can be found if necessary... --- 4,8 ---- # and creates a pth file import os, sys, glob, shutil, time ! import winreg # Send output somewhere so it can be found if necessary... Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.81.2.7 retrieving revision 1.81.2.8 diff -C2 -d -r1.81.2.7 -r1.81.2.8 *** setup.py 26 Nov 2008 09:03:28 -0000 1.81.2.7 --- setup.py 6 Dec 2008 01:48:26 -0000 1.81.2.8 *************** *** 71,77 **** import types, glob import re - import _winreg is_py3k = sys.version_info > (3,) # get this out of the way early on... # The rest of our imports. --- 71,82 ---- import types, glob import re is_py3k = sys.version_info > (3,) # get this out of the way early on... + # We have special handling for _winreg so our setup3.py script can avoid + # using the 'imports' fixer and therefore start much faster... + if is_py3k: + import winreg as _winreg + else: + import _winreg # The rest of our imports. *************** *** 409,412 **** --- 414,420 ---- self.extra_compile_args.append("/D_UNICODE") self.extra_compile_args.append("/DWINNT") + # Unicode, Windows executables seem to need this magic: + if "/SUBSYSTEM:WINDOWS" in self.extra_link_args: + self.extra_link_args.append("/ENTRY:wWinMainCRTStartup") class WinExt_pythonwin(WinExt): *************** *** 415,421 **** kw["dsp_file"] = "pythonwin/" + name + ".dsp" if 'unicode_mode' not in kw: ! kw['unicode_mode']=False kw.setdefault("extra_compile_args", []).extend( ['-D_AFXDLL', '-D_AFXEXT','-D_MBCS']) WinExt.__init__(self, name, **kw) def get_pywin32_dir(self): --- 423,430 ---- kw["dsp_file"] = "pythonwin/" + name + ".dsp" if 'unicode_mode' not in kw: ! kw['unicode_mode']=None kw.setdefault("extra_compile_args", []).extend( ['-D_AFXDLL', '-D_AFXEXT','-D_MBCS']) + WinExt.__init__(self, name, **kw) def get_pywin32_dir(self): *************** *** 499,516 **** do_2to3 = False and is_py3k # XXX - py3k branch - syntax is already py3k! if do_2to3: - # hack into the import fixer to remove the Tk fixers - they cause trouble - # for some of our things with the same name. - from lib2to3.fixes import fix_imports - # 'Dialog' fixer causes pywin/mfc/dialog.py's DlgSimpleImport to subclass - # a Tk dialog instead of a pywin one! - del fix_imports.MAPPING["Dialog"] def refactor_filenames(filenames): ! from lib2to3.refactor import RefactoringTool, get_fixers_from_package ! fixers = get_fixers_from_package('lib2to3.fixes') options = dict(doctests_only=False, fix=[], list_fixes=[], print_function=False, verbose=False, write=True) ! r = RefactoringTool(fixers, options) for updated_file in filenames: if os.path.splitext(updated_file)[1] not in ['.py', '.pys']: --- 508,523 ---- do_2to3 = False and is_py3k # XXX - py3k branch - syntax is already py3k! if do_2to3: def refactor_filenames(filenames): ! from lib2to3.refactor import RefactoringTool ! # we only need some fixers. ! fixers = """basestring exec except dict import imports next nonzero ! print raw_input long standarderror types unicode urllib ! xrange""".split() ! fqfixers = ['lib2to3.fixes.fix_' + f for f in fixers] options = dict(doctests_only=False, fix=[], list_fixes=[], print_function=False, verbose=False, write=True) ! r = RefactoringTool(fqfixers, options) for updated_file in filenames: if os.path.splitext(updated_file)[1] not in ['.py', '.pys']: *************** *** 1225,1229 **** # for bdist_wininst to use) - in which case we must *not* run our # installer ! if not self.dry_run and not self.skip_build and not self.root: # We must run the script we just installed into Scripts, as it # may have had 2to3 run over it. --- 1232,1236 ---- # for bdist_wininst to use) - in which case we must *not* run our # installer ! if not self.dry_run and not self.root: # We must run the script we just installed into Scripts, as it # may have had 2to3 run over it. *************** *** 1313,1318 **** except ImportError: ok = False - # XXX - verstamp still broken on py3k - ok = False if ok: stamp_script = os.path.join(sys.prefix, "Lib", "site-packages", --- 1320,1323 ---- *************** *** 1323,1326 **** --- 1328,1332 ---- args.append(stamp_script) args.append("--version=%s" % (pywin32_version,)) + args.append("--description=Python extension module") args.append("--comments=http://pywin32.sourceforge.net") args.append("--original-filename=%s" % (os.path.basename(output_filename),)) *************** *** 1715,1719 **** WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h", platforms=['win32']), ] # win32ui is large, so we reserve more bytes than normal --- 1721,1727 ---- WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), ! WinExt_pythonwin("dde", pch_header="stdafxdde.h", ! depends=["win32/src/stddde.h", "pythonwin/ddemodule.h"], ! platforms=['win32']), ] # win32ui is large, so we reserve more bytes than normal Index: setup3.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Attic/setup3.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** setup3.py 26 Nov 2008 07:17:38 -0000 1.1.2.2 --- setup3.py 6 Dec 2008 01:48:26 -0000 1.1.2.3 *************** *** 4,8 **** from lib2to3.refactor import RefactoringTool, get_fixers_from_package ! fixers = ['lib2to3.fixes.fix_print', 'lib2to3.fixes.fix_except', 'lib2to3.fixes.fix_imports'] #get_fixers_from_package('lib2to3.fixes') options = dict(doctests_only=False, fix=[], list_fixes=[], print_function=False, verbose=False, --- 4,8 ---- from lib2to3.refactor import RefactoringTool, get_fixers_from_package ! fixers = ['lib2to3.fixes.fix_print', 'lib2to3.fixes.fix_except'] options = dict(doctests_only=False, fix=[], list_fixes=[], print_function=False, verbose=False, Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.26.2.4 retrieving revision 1.26.2.5 diff -C2 -d -r1.26.2.4 -r1.26.2.5 *** CHANGES.txt 27 Nov 2008 11:31:03 -0000 1.26.2.4 --- CHANGES.txt 6 Dec 2008 01:48:26 -0000 1.26.2.5 *************** *** 9,12 **** --- 9,16 ---- ---------------- + * Pythonwin updates from Rémi Paucher; enter completes auto-complete in + the editor and interactive windows, auto-complete should now work on French + keyboards. + * Lots of work to better support unicode, py3k and 64bits from Roger. Most of these changes will be invisible, and those that are not |
From: Mark H. <mha...@us...> - 2008-12-06 02:17:08
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin/pywin Modified Files: Tag: py3k default.cfg Log Message: merge various fixes and changes from the trunk Index: default.cfg =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/default.cfg,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -C2 -d -r1.9.2.1 -r1.9.2.2 *** default.cfg 29 Aug 2008 06:16:06 -0000 1.9.2.1 --- default.cfg 6 Dec 2008 01:48:26 -0000 1.9.2.2 *************** *** 197,202 **** find.lastSearch.findText = word find.lastSearch.sel = (start,end) ! except Exception as why: ! print (repr(why), why) find.FindNext() --- 197,203 ---- find.lastSearch.findText = word find.lastSearch.sel = (start,end) ! except Exception: ! import traceback ! traceback.print_exc() find.FindNext() |
From: Mark H. <mha...@us...> - 2008-12-06 02:17:04
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin/pywin/Demos Modified Files: Tag: py3k createwin.py Log Message: merge various fixes and changes from the trunk Index: createwin.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/createwin.py,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** createwin.py 1 Sep 1999 23:33:35 -0000 1.1 --- createwin.py 6 Dec 2008 01:48:26 -0000 1.1.4.1 *************** *** 35,39 **** RedBox.DoPaint(self, dc) r = self.GetClientRect() ! dc.Pie(r[0], r[1], r[2], r[3], 0,0,r[2], r[3]/2) def MakeDlgTemplate(): --- 35,39 ---- RedBox.DoPaint(self, dc) r = self.GetClientRect() ! dc.Pie(r[0], r[1], r[2], r[3], 0,0,r[2], r[3]//2) def MakeDlgTemplate(): *************** *** 97,99 **** demo(1) - # II Cor. 12:9 $Header$ --- 97,98 ---- |
From: Mark H. <mha...@us...> - 2008-12-06 02:16:59
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin/pywin/framework Modified Files: Tag: py3k interact.py intpyapp.py Log Message: merge various fixes and changes from the trunk Index: intpyapp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/intpyapp.py,v retrieving revision 1.11.2.5 retrieving revision 1.11.2.6 diff -C2 -d -r1.11.2.5 -r1.11.2.6 *** intpyapp.py 4 Dec 2008 07:28:46 -0000 1.11.2.5 --- intpyapp.py 6 Dec 2008 01:48:26 -0000 1.11.2.6 *************** *** 158,163 **** return 1 except: ! win32ui.MessageBox("There was an error in the DDE conversation with Pythonwin") ! traceback.print_exc() def InitInstance(self): --- 158,164 ---- return 1 except: ! # It is too early to 'print' an exception - we ! # don't have stdout setup yet! ! win32ui.DisplayTraceback(sys.exc_info(), " - error in DDE conversation with Pythonwin") def InitInstance(self): *************** *** 248,252 **** elif argType=="/rundlg": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: from . import scriptutils --- 249,253 ---- elif argType=="/rundlg": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: from . import scriptutils *************** *** 254,258 **** elif argType=="/run": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: from . import scriptutils --- 255,259 ---- elif argType=="/run": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: from . import scriptutils *************** *** 270,278 **** raise TypeError("Command line arguments not recognised") except: ! typ, val, tb = sys.exc_info() ! print("There was an error processing the command line args") ! traceback.print_exception(typ, val, tb, None, sys.stdout) ! win32ui.OutputDebug("There was a problem with the command line args - %s: %s" % (repr(typ),repr(val))) ! tb = None # Prevent a cycle --- 271,276 ---- raise TypeError("Command line arguments not recognised") except: ! # too early for print anything. ! win32ui.DisplayTraceback(sys.exc_info(), " - error processing command line args") Index: interact.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v retrieving revision 1.17.2.2 retrieving revision 1.17.2.3 diff -C2 -d -r1.17.2.2 -r1.17.2.3 *** interact.py 27 Nov 2008 11:31:03 -0000 1.17.2.2 --- interact.py 6 Dec 2008 01:48:26 -0000 1.17.2.3 *************** *** 443,446 **** --- 443,452 ---- # def ProcessEnterEvent(self, event ): + #If autocompletion has been triggered, complete and do not process event + if self.SCIAutoCActive(): + self.SCIAutoCComplete() + self.SCICancel() + return + self.SCICancel() # First, check for an error message |
From: Mark H. <mha...@us...> - 2008-12-06 02:16:55
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin/pywin/scintilla Modified Files: Tag: py3k bindings.py config.py keycodes.py Log Message: merge various fixes and changes from the trunk Index: config.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/config.py,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** config.py 29 Aug 2008 06:16:42 -0000 1.6.2.1 --- config.py 6 Dec 2008 01:48:26 -0000 1.6.2.2 *************** *** 59,63 **** def find_config_files(): ! return [os.path.split(x)[1] for x in [os.path.splitext(x)[0] for x in glob.glob(os.path.join(pywin.__path__[0], "*.cfg"))]] class ConfigManager: --- 59,65 ---- def find_config_files(): ! return [os.path.split(x)[1] ! for x in [os.path.splitext(x)[0] for x in glob.glob(os.path.join(pywin.__path__[0], "*.cfg"))] ! ] class ConfigManager: *************** *** 281,288 **** self._save_data("extension code", c) except SyntaxError as details: ! msg = details[0] ! errlineno = details[1][1] + start_lineno # Should handle syntax errors better here, and offset the lineno. ! self.report_error("Compiling extension code failed: Line %d: %s" % (errlineno, msg)) return line, lineno --- 283,290 ---- self._save_data("extension code", c) except SyntaxError as details: ! errlineno = details.lineno + start_lineno # Should handle syntax errors better here, and offset the lineno. ! self.report_error("Compiling extension code failed:\r\nFile: %s\r\nLine %d\r\n%s" \ ! % (details.filename, errlineno, details.msg)) return line, lineno Index: bindings.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/bindings.py,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** bindings.py 27 Nov 2008 11:31:03 -0000 1.5.2.2 --- bindings.py 6 Dec 2008 01:48:26 -0000 1.5.2.3 *************** *** 169,172 **** --- 169,177 ---- # (XXX - which do not work :-( event = self.keymap.get( keyinfo ) + #Enable autoexpand an autocompletion on French keyborads + if keyinfo == (190, 16): + event = "KeyDot" + elif keyinfo == (222, 0): + event = "<<expand-word>>" if event is None: ## if key == 220: # Dead key Index: keycodes.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/keycodes.py,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** keycodes.py 29 Aug 2008 06:16:42 -0000 1.5.2.1 --- keycodes.py 6 Dec 2008 01:48:26 -0000 1.5.2.2 *************** *** 31,35 **** def _fillmap(): # Pull the VK_names from win32con ! names = [entry for entry in list(win32con.__dict__.keys()) if entry[:3]=="VK_"] for name in names: n = name[3:].lower() --- 31,35 ---- def _fillmap(): # Pull the VK_names from win32con ! names = [entry for entry in win32con.__dict__ if entry.startswith("VK_")] for name in names: n = name[3:].lower() |
From: Mark H. <mha...@us...> - 2008-12-06 02:16:47
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3631/Pythonwin/pywin/mfc Modified Files: Tag: py3k dialog.py Log Message: merge various fixes and changes from the trunk Index: dialog.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/dialog.py,v retrieving revision 1.3.4.2 retrieving revision 1.3.4.3 diff -C2 -d -r1.3.4.2 -r1.3.4.3 *** dialog.py 26 Nov 2008 07:17:39 -0000 1.3.4.2 --- dialog.py 6 Dec 2008 01:48:26 -0000 1.3.4.3 *************** *** 221,228 **** # uses a simple dialog to return a string object. if title is None: title=win32ui.GetMainFrame().GetWindowText() ! class DlgSimpleInput(Dialog): def __init__(self, prompt, defValue, title ): self.title=title ! Dialog.__init__(self, win32ui.IDD_SIMPLE_INPUT) self.AddDDX(win32ui.IDC_EDIT1,'result') self.AddDDX(win32ui.IDC_PROMPT1, 'prompt') --- 221,230 ---- # uses a simple dialog to return a string object. if title is None: title=win32ui.GetMainFrame().GetWindowText() ! # 2to3 insists on converting 'Dialog.__init__' to 'tkinter.dialog...' ! DlgBaseClass = Dialog ! class DlgSimpleInput(DlgBaseClass): def __init__(self, prompt, defValue, title ): self.title=title ! DlgBaseClass.__init__(self, win32ui.IDD_SIMPLE_INPUT) self.AddDDX(win32ui.IDC_EDIT1,'result') self.AddDDX(win32ui.IDC_PROMPT1, 'prompt') *************** *** 231,235 **** def OnInitDialog(self): self.SetWindowText(self.title) ! return Dialog.OnInitDialog(self) dlg=DlgSimpleInput( prompt, defValue, title) --- 233,237 ---- def OnInitDialog(self): self.SetWindowText(self.title) ! return DlgBaseClass.OnInitDialog(self) dlg=DlgSimpleInput( prompt, defValue, title) |
From: Mark H. <mha...@us...> - 2008-12-06 02:16:44
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3248/com/win32com/servers Modified Files: Tag: py3k PythonTools.py Log Message: convert mixed tab/space file to space only Index: PythonTools.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/PythonTools.py,v retrieving revision 1.3.4.3 retrieving revision 1.3.4.4 diff -C2 -d -r1.3.4.3 -r1.3.4.4 *** PythonTools.py 27 Nov 2008 11:31:05 -0000 1.3.4.3 --- PythonTools.py 6 Dec 2008 01:46:36 -0000 1.3.4.4 *************** *** 1,3 **** - import sys import time --- 1,2 ---- *************** *** 26,43 **** if __name__=='__main__': ! from win32com.server.register import RegisterServer, UnregisterServer ! clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}" ! progid = "Python.Tools" ! verprogid = "Python.Tools.1" ! if "--unregister" in sys.argv: ! print("Unregistering...") ! UnregisterServer(clsid, progid, verprogid) ! print("Unregistered OK") ! else: ! print("Registering COM server...") ! RegisterServer(clsid, ! "win32com.servers.PythonTools.Tools", ! "Python Tools", ! progid, ! verprogid) ! print("Class registered.") --- 25,42 ---- if __name__=='__main__': ! from win32com.server.register import RegisterServer, UnregisterServer ! clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}" ! progid = "Python.Tools" ! verprogid = "Python.Tools.1" ! if "--unregister" in sys.argv: ! print("Unregistering...") ! UnregisterServer(clsid, progid, verprogid) ! print("Unregistered OK") ! else: ! print("Registering COM server...") ! RegisterServer(clsid, ! "win32com.servers.PythonTools.Tools", ! "Python Tools", ! progid, ! verprogid) ! print("Class registered.") |
From: Mark H. <mha...@us...> - 2008-12-06 02:16:39
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3301/com/win32com/servers Modified Files: PythonTools.py Log Message: convert mixed tab/space file to space only Index: PythonTools.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/PythonTools.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PythonTools.py 27 Nov 2008 09:42:41 -0000 1.5 --- PythonTools.py 6 Dec 2008 01:46:49 -0000 1.6 *************** *** 1,3 **** - import sys import time --- 1,2 ---- *************** *** 25,42 **** if __name__=='__main__': ! from win32com.server.register import RegisterServer, UnregisterServer ! clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}" ! progid = "Python.Tools" ! verprogid = "Python.Tools.1" ! if "--unregister" in sys.argv: ! print "Unregistering..." ! UnregisterServer(clsid, progid, verprogid) ! print "Unregistered OK" ! else: ! print "Registering COM server..." ! RegisterServer(clsid, ! "win32com.servers.PythonTools.Tools", ! "Python Tools", ! progid, ! verprogid) ! print "Class registered." --- 24,41 ---- if __name__=='__main__': ! from win32com.server.register import RegisterServer, UnregisterServer ! clsid = "{06ce7630-1d81-11d0-ae37-c2fa70000000}" ! progid = "Python.Tools" ! verprogid = "Python.Tools.1" ! if "--unregister" in sys.argv: ! print "Unregistering..." ! UnregisterServer(clsid, progid, verprogid) ! print "Unregistered OK" ! else: ! print "Registering COM server..." ! RegisterServer(clsid, ! "win32com.servers.PythonTools.Tools", ! "Python Tools", ! progid, ! verprogid) ! print "Class registered." |
From: Mark H. <mha...@us...> - 2008-12-06 01:53:48
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4239/Pythonwin Modified Files: win32uimodule.cpp Log Message: add blank lines between functions (from py3k branch) Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** win32uimodule.cpp 6 Dec 2008 00:38:29 -0000 1.43 --- win32uimodule.cpp 6 Dec 2008 01:50:53 -0000 1.44 *************** *** 152,155 **** --- 152,156 ---- ctor = thector; } + ui_type::~ui_type() { *************** *** 221,224 **** --- 222,227 ---- return pNew; } + + /*static*/ BOOL ui_base_class::is_uiobject(PyObject *&o, ui_type *which) { *************** *** 262,265 **** --- 265,269 ---- return FALSE; } + BOOL ui_base_class::is_uiobject(ui_type *which) { *************** *** 307,310 **** --- 311,315 ---- return -1; } + /*static*/ PyObject * ui_base_class::sui_repr( PyObject *op ) |
From: Mark H. <mha...@us...> - 2008-12-06 01:53:44
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3936/Pythonwin Modified Files: win32uiExt.h Log Message: use more appropriate 'message' helper Index: win32uiExt.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiExt.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** win32uiExt.h 13 Nov 2008 04:04:50 -0000 1.15 --- win32uiExt.h 6 Dec 2008 01:49:31 -0000 1.16 *************** *** 828,834 **** // @xref <om PyCMDIChildWnd.GetMessageString> if (helper.call((int &)nID)) { ! char *ret; ! if (helper.retval(ret)) ! rMessage = ret; } else --- 828,832 ---- // @xref <om PyCMDIChildWnd.GetMessageString> if (helper.call((int &)nID)) { ! helper.retval(rMessage); } else |
From: Mark H. <mha...@us...> - 2008-12-06 00:47:34
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23351/win32/test Modified Files: test_win32file.py Log Message: failed attempt to stop test hanging on failure, which it does for me on 64bits Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** test_win32file.py 27 Nov 2008 11:11:11 -0000 1.16 --- test_win32file.py 6 Dec 2008 00:47:23 -0000 1.17 *************** *** 231,234 **** --- 231,236 ---- thread = threading.Thread(target=self._IOCPServerThread, args=(handle,port, test_overlapped_death)) + # hrmph - markh is seeing failures here on x64 - and a hang! + thread.setDaemon(True) # avoid hanging entire test suite on failure. thread.start() try: *************** *** 242,246 **** finally: handle.Close() ! thread.join() def testCompletionPortsNonQueuedBadReference(self): --- 244,249 ---- finally: handle.Close() ! thread.join(3) ! self.failIf(thread.isAlive(), "thread didn't finish") def testCompletionPortsNonQueuedBadReference(self): |
From: Mark H. <mha...@us...> - 2008-12-06 00:46:51
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23203/win32/test Modified Files: testall.py Log Message: catch all errors while checking modules import Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testall.py 26 Nov 2008 08:56:33 -0000 1.8 --- testall.py 6 Dec 2008 00:46:46 -0000 1.9 *************** *** 72,76 **** try: __import__(base) ! except ImportError: print "FAILED to import", name raise --- 72,76 ---- try: __import__(base) ! except: print "FAILED to import", name raise |
From: Mark H. <mha...@us...> - 2008-12-06 00:43:51
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22532/win32/src Modified Files: win32file.i Log Message: remove commented out #define Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** win32file.i 26 Nov 2008 01:05:36 -0000 1.94 --- win32file.i 6 Dec 2008 00:43:45 -0000 1.95 *************** *** 23,27 **** %{ - //#define UNICODE #ifndef MS_WINCE //#define FAR --- 23,26 ---- |
From: Mark H. <mha...@us...> - 2008-12-06 00:43:25
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22444/win32/src Modified Files: PyWinTypes.h odbc.cpp Log Message: Make TmpPyObject private to odbc module Index: odbc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** odbc.cpp 3 Dec 2008 22:34:21 -0000 1.27 --- odbc.cpp 6 Dec 2008 00:43:19 -0000 1.28 *************** *** 846,849 **** --- 846,867 ---- } + // Class to hold a temporary reference that decrements itself + class TmpPyObject + { + public: + PyObject *tmp; + TmpPyObject() { tmp=NULL; } + TmpPyObject(PyObject *ob) { tmp=ob; } + PyObject * operator= (PyObject *ob){ + Py_XDECREF(tmp); + tmp=ob; + return tmp; + } + + boolean operator== (PyObject *ob) { return tmp==ob; } + operator PyObject *() { return tmp; } + ~TmpPyObject() { Py_XDECREF(tmp); } + }; + static int ibindDate(cursorObject*cur, int column, PyObject *item) { Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** PyWinTypes.h 4 Dec 2008 00:17:13 -0000 1.55 --- PyWinTypes.h 6 Dec 2008 00:43:19 -0000 1.56 *************** *** 782,804 **** // End of exception helper macros. - - // Class to hold a temporary reference that decrements itself - class TmpPyObject - { - public: - PyObject *tmp; - TmpPyObject() { tmp=NULL; } - TmpPyObject(PyObject *ob) { tmp=ob; } - PyObject * operator= (PyObject *ob){ - Py_XDECREF(tmp); - tmp=ob; - return tmp; - } - - boolean operator== (PyObject *ob) { return tmp==ob; } - operator PyObject *() { return tmp; } - ~TmpPyObject() { Py_XDECREF(tmp); } - }; - #endif // __PYWINTYPES_H__ --- 782,785 ---- |
From: Mark H. <mha...@us...> - 2008-12-06 00:42:45
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22295/win32/Lib Modified Files: win32verstamp.py Log Message: Use py3k compatible handling of bytes Index: win32verstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32verstamp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32verstamp.py 26 Nov 2008 08:56:33 -0000 1.3 --- win32verstamp.py 6 Dec 2008 00:42:39 -0000 1.4 *************** *** 2,7 **** """ ! from win32api import BeginUpdateResource, UpdateResource, EndUpdateResource, Unicode ! U = Unicode import os --- 2,6 ---- """ ! from win32api import BeginUpdateResource, UpdateResource, EndUpdateResource import os *************** *** 16,19 **** --- 15,19 ---- VOS_NT_WINDOWS32 = 0x00040004 + null_byte = "\0".encode("ascii") # str in py2k, bytes in py3k # # Set VS_FF_PRERELEASE and DEBUG if Debug *************** *** 47,54 **** def nullterm(s): ! try: ! return buffer(unicode(s)) + "\0\0" ! except NameError: # No unicode builtin ! return U(s).raw + '\0\0' def pad32(s, extra=2): --- 47,52 ---- def nullterm(s): ! # get raw bytes for a NULL terminated unicode string. ! return (unicode(s) + u'\0').encode('unicode-internal') def pad32(s, extra=2): *************** *** 56,60 **** l = 4 - ((len(s) + extra) & 3) if l < 4: ! return s + ('\0' * l) return s --- 54,58 ---- l = 4 - ((len(s) + extra) & 3) if l < 4: ! return s + (null_byte * l) return s |
From: Mark H. <mha...@us...> - 2008-12-06 00:42:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22210/com/win32comext/mapi Modified Files: mapiutil.py Log Message: replace map/lambda with list comps Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mapiutil.py 4 Dec 2008 07:07:04 -0000 1.9 --- mapiutil.py 6 Dec 2008 00:42:06 -0000 1.10 *************** *** 82,86 **** return None if bRetList: ! return map( lambda(v): v[1], data ) else: return data[0][1] --- 82,86 ---- return None if bRetList: ! return [v[1] for v in data] else: return data[0][1] |
From: Mark H. <mha...@us...> - 2008-12-06 00:41:49
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22159/com/win32comext/axdebug Modified Files: debugger.py Log Message: Move to dict iterators Index: debugger.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/debugger.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** debugger.py 27 Nov 2008 05:58:17 -0000 1.4 --- debugger.py 6 Dec 2008 00:41:43 -0000 1.5 *************** *** 84,88 **** self.axdebugger = None print "Closing %d nodes" % (len(self.nodes)) ! for node in self.nodes.values(): node.Close() self.nodes = {} --- 84,88 ---- self.axdebugger = None print "Closing %d nodes" % (len(self.nodes)) ! for node in self.nodes.itervalues(): node.Close() self.nodes = {} |
From: Mark H. <mha...@us...> - 2008-12-06 00:41:19
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22053/com/win32com/client Modified Files: combrowse.py Log Message: remove unused import Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** combrowse.py 4 Dec 2008 03:48:43 -0000 1.11 --- combrowse.py 6 Dec 2008 00:41:13 -0000 1.12 *************** *** 25,29 **** import win32con import win32api, win32ui ! import string, sys import pythoncom from win32com.client import util --- 25,29 ---- import win32con import win32api, win32ui ! import sys import pythoncom from win32com.client import util |
From: Mark H. <mha...@us...> - 2008-12-06 00:40:58
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21863/Pythonwin/pywin/scintilla Modified Files: config.py Log Message: Use py3k compatible exception attributes when handing SyntaxError. Index: config.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/config.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** config.py 4 Dec 2008 07:02:55 -0000 1.8 --- config.py 6 Dec 2008 00:40:52 -0000 1.9 *************** *** 283,290 **** self._save_data("extension code", c) except SyntaxError, details: ! msg = details[0] ! errlineno = details[1][1] + start_lineno # Should handle syntax errors better here, and offset the lineno. ! self.report_error("Compiling extension code failed: Line %d: %s" % (errlineno, msg)) return line, lineno --- 283,290 ---- self._save_data("extension code", c) except SyntaxError, details: ! errlineno = details.lineno + start_lineno # Should handle syntax errors better here, and offset the lineno. ! self.report_error("Compiling extension code failed:\r\nFile: %s\r\nLine %d\r\n%s" \ ! % (details.filename, errlineno, details.msg)) return line, lineno |
From: Mark H. <mha...@us...> - 2008-12-06 00:40:05
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21673/Pythonwin/pywin/idle Modified Files: AutoIndent.py Log Message: Syntax modernization: use iteritems and int division. Index: AutoIndent.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/AutoIndent.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AutoIndent.py 27 Nov 2008 03:53:25 -0000 1.6 --- AutoIndent.py 6 Dec 2008 00:39:59 -0000 1.7 *************** *** 117,121 **** def config(self, **options): ! for key, value in options.items(): if key == 'usetabs': self.usetabs = value --- 117,121 ---- def config(self, **options): ! for key, value in options.iteritems(): if key == 'usetabs': self.usetabs = value *************** *** 493,497 **** elif ch == '\t': raw = raw + 1 ! effective = (effective / tabwidth + 1) * tabwidth else: break --- 493,497 ---- elif ch == '\t': raw = raw + 1 ! effective = (effective // tabwidth + 1) * tabwidth else: break |
From: Mark H. <mha...@us...> - 2008-12-06 00:39:23
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21551/Pythonwin/pywin/framework Modified Files: intpyapp.py Log Message: Use win32ui.DisplayTraceback for early errors, and use fully-qualified module names in the dde conversation with existing processes. Index: intpyapp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/intpyapp.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** intpyapp.py 4 Dec 2008 05:21:13 -0000 1.13 --- intpyapp.py 6 Dec 2008 00:39:16 -0000 1.14 *************** *** 158,163 **** return 1 except: ! win32ui.MessageBox("There was an error in the DDE conversation with Pythonwin") ! traceback.print_exc() def InitInstance(self): --- 158,164 ---- return 1 except: ! # It is too early to 'print' an exception - we ! # don't have stdout setup yet! ! win32ui.DisplayTraceback(sys.exc_info(), " - error in DDE conversation with Pythonwin") def InitInstance(self): *************** *** 248,252 **** elif argType=="/rundlg": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils --- 249,253 ---- elif argType=="/rundlg": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils *************** *** 254,258 **** elif argType=="/run": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils --- 255,259 ---- elif argType=="/run": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils *************** *** 270,278 **** raise TypeError("Command line arguments not recognised") except: ! typ, val, tb = sys.exc_info() ! print "There was an error processing the command line args" ! traceback.print_exception(typ, val, tb, None, sys.stdout) ! win32ui.OutputDebug("There was a problem with the command line args - %s: %s" % (repr(typ),repr(val))) ! tb = None # Prevent a cycle --- 271,276 ---- raise TypeError("Command line arguments not recognised") except: ! # too early for print anything. ! win32ui.DisplayTraceback(sys.exc_info(), " - error processing command line args") |
From: Mark H. <mha...@us...> - 2008-12-06 00:38:36
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21349/Pythonwin Modified Files: win32uimodule.cpp Log Message: New win32ui.DisplayTraceback function to dislpay a traceback in a dialog. Useful for errors that happen before pythonwin has set things up such that 'print' will work (its worse on py3k - sys.stdout is None, so attempts to print *always* fail, and not with an IOError like 2.x) Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** win32uimodule.cpp 3 Dec 2008 22:34:20 -0000 1.42 --- win32uimodule.cpp 6 Dec 2008 00:38:29 -0000 1.43 *************** *** 805,808 **** --- 805,824 ---- } + // @pymethod |win32ui|DisplayTraceback|Displays a traceback in a dialog box. + static PyObject * + ui_python_display_traceback( PyObject *self, PyObject *args ) + { + PyObject *obTitle = Py_None; + PyObject *t, *v, *tb; + if (!PyArg_ParseTuple(args, "(OOO)|O:DisplayTraceback", &t, &v, &tb, &obTitle)) + return NULL; + TCHAR *title; + if (!PyWinObject_AsTCHAR(obTitle, &title, TRUE)) + return NULL; + DisplayPythonTraceback(t, v, tb, title); + PyWinObject_FreeTCHAR(title); + RETURN_NONE; + } + // @pymethod |win32ui|OutputDebugString|Sends a string to the Windows debugging device. static PyObject * *************** *** 1915,1918 **** --- 1931,1935 ---- {"DestroyDebuggerThread", ui_destroy_debugger_thread, 1}, // @pymeth DestroyDebuggerThread|Cleans up the debugger thread. {"DoWaitCursor", ui_do_wait_cursor, 1}, // @pymeth DoWaitCursor|Changes the cursor to/from a wait cursor. + {"DisplayTraceback", ui_python_display_traceback, 1}, // @pymeth DisplayTraceback|Displays a traceback in a dialog box. {"Enable3dControls", ui_enable_3d_controls, 1 }, // @pymeth Enable3dControls|Enables 3d controls for the application. {"FindWindow", PyCWnd::FindWindow, 1}, // @pymeth FindWindow|Searches for the specified top-level window |
From: Mark H. <mha...@us...> - 2008-12-06 00:37:21
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21175/Pythonwin/pywin/Demos Modified Files: progressbar.py Log Message: remove pointless $Header$ line at EOF Index: progressbar.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/progressbar.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** progressbar.py 1 Sep 1999 23:33:35 -0000 1.1 --- progressbar.py 6 Dec 2008 00:37:15 -0000 1.2 *************** *** 87,91 **** if __name__=='__main__': demo(1) - - # $Header$ - --- 87,88 ---- |
From: Mark H. <mha...@us...> - 2008-12-06 00:36:46
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21016/Pythonwin/pywin/Demos Modified Files: createwin.py Log Message: Use int division when drawing the sample pie-chart. Index: createwin.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/createwin.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** createwin.py 1 Sep 1999 23:33:35 -0000 1.1 --- createwin.py 6 Dec 2008 00:36:39 -0000 1.2 *************** *** 35,39 **** RedBox.DoPaint(self, dc) r = self.GetClientRect() ! dc.Pie(r[0], r[1], r[2], r[3], 0,0,r[2], r[3]/2) def MakeDlgTemplate(): --- 35,39 ---- RedBox.DoPaint(self, dc) r = self.GetClientRect() ! dc.Pie(r[0], r[1], r[2], r[3], 0,0,r[2], r[3]//2) def MakeDlgTemplate(): *************** *** 97,99 **** demo(1) - # II Cor. 12:9 $Header$ --- 97,98 ---- |