pywin32-checkins Mailing List for Python for Windows Extensions (Page 12)
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...> - 2010-10-23 01:03:30
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4893/com/win32comext/mapi/src Modified Files: mapiutil.cpp Log Message: Fix Python reference leak when creating SRowSet objects Index: mapiutil.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/src/mapiutil.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mapiutil.cpp 9 Aug 2008 01:51:39 -0000 1.6 --- mapiutil.cpp 23 Oct 2010 01:03:22 -0000 1.7 *************** *** 632,635 **** --- 632,636 ---- } } + Py_DECREF(rowObject); rowObject = NULL; // important for cleanup } |
From: Mark H. <mha...@us...> - 2010-10-22 23:48:47
|
Update of /cvsroot/pywin32/pywin32/com/win32com/demos In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10695 Modified Files: dump_clipboard.py Log Message: ignore errors fetching clipboard data Index: dump_clipboard.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/dump_clipboard.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dump_clipboard.py 27 Nov 2008 09:33:22 -0000 1.2 --- dump_clipboard.py 22 Oct 2010 23:48:38 -0000 1.3 *************** *** 30,34 **** print "Eeek - QGD indicated failure for tymed", t_this # now actually get it. ! medium = do.GetData(fetc_query) if medium.tymed==pythoncom.TYMED_GDI: data = "GDI handle %d" % medium.data --- 30,38 ---- print "Eeek - QGD indicated failure for tymed", t_this # now actually get it. ! try: ! medium = do.GetData(fetc_query) ! except pythoncom.com_error, exc: ! print "Failed to get the clipboard data:", exc ! continue if medium.tymed==pythoncom.TYMED_GDI: data = "GDI handle %d" % medium.data |
From: Roger U. <ru...@us...> - 2010-10-15 02:36:41
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv633 Modified Files: win32job.i Log Message: Remove reserved constants Index: win32job.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32job.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32job.i 3 Jan 2009 06:43:58 -0000 1.6 --- win32job.i 15 Oct 2010 02:36:33 -0000 1.7 *************** *** 456,464 **** #define JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK #define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE - #define JOB_OBJECT_LIMIT_RESERVED2 JOB_OBJECT_LIMIT_RESERVED2 - #define JOB_OBJECT_LIMIT_RESERVED3 JOB_OBJECT_LIMIT_RESERVED3 - #define JOB_OBJECT_LIMIT_RESERVED4 JOB_OBJECT_LIMIT_RESERVED4 - #define JOB_OBJECT_LIMIT_RESERVED5 JOB_OBJECT_LIMIT_RESERVED5 - #define JOB_OBJECT_LIMIT_RESERVED6 JOB_OBJECT_LIMIT_RESERVED6 #define JOB_OBJECT_LIMIT_VALID_FLAGS JOB_OBJECT_LIMIT_VALID_FLAGS --- 456,459 ---- |
From: Roger U. <ru...@us...> - 2010-09-28 15:54:39
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9975 Modified Files: win32dlg.cpp Log Message: In win32ui.CreateFileDialog, allow filter arg to be None as documented Index: win32dlg.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32dlg.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** win32dlg.cpp 8 Jan 2009 22:11:52 -0000 1.13 --- win32dlg.cpp 28 Sep 2010 15:54:32 -0000 1.14 *************** *** 813,817 **** if (PyWinObject_AsTCHAR(obDefExt, &szDefExt, TRUE) &&PyWinObject_AsTCHAR(obFileName, &szFileName, TRUE) ! &&PyWinObject_AsTCHAR(obFilter, &szFilter)){ pDlg = new CFileDialog( bFileOpen, szDefExt, szFileName, flags, szFilter, pParent ); if (!pDlg){ --- 813,817 ---- if (PyWinObject_AsTCHAR(obDefExt, &szDefExt, TRUE) &&PyWinObject_AsTCHAR(obFileName, &szFileName, TRUE) ! &&PyWinObject_AsTCHAR(obFilter, &szFilter, TRUE)){ pDlg = new CFileDialog( bFileOpen, szDefExt, szFileName, flags, szFilter, pParent ); if (!pDlg){ |
From: Mark H. <mha...@us...> - 2010-08-30 04:25:52
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12519 Modified Files: PythonService.cpp Log Message: Fix SERVICE_CONTROL_POWEREVENT handling (via bug 2924128) Index: PythonService.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PythonService.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** PythonService.cpp 7 Feb 2009 00:32:30 -0000 1.27 --- PythonService.cpp 30 Aug 2010 04:25:44 -0000 1.28 *************** *** 961,968 **** break; case SERVICE_CONTROL_POWEREVENT: { ! POWERBROADCAST_SETTING *pbs = (POWERBROADCAST_SETTING *)eventData; ! sub = Py_BuildValue("NN", ! PyWinObject_FromIID(pbs->PowerSetting), ! PyString_FromStringAndSize((char *)pbs->Data, pbs->DataLength)); break; } --- 961,973 ---- break; case SERVICE_CONTROL_POWEREVENT: { ! if (dwEventType == PBT_POWERSETTINGCHANGE) { ! POWERBROADCAST_SETTING *pbs = (POWERBROADCAST_SETTING *)eventData; ! sub = Py_BuildValue("NN", ! PyWinObject_FromIID(pbs->PowerSetting), ! PyString_FromStringAndSize((char *)pbs->Data, pbs->DataLength)); ! } else { ! sub = Py_None; ! Py_INCREF(Py_None); ! } break; } |
From: Mark H. <mha...@us...> - 2010-08-30 02:44:25
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2281/win32/src Modified Files: win32apimodule.cpp Log Message: add doc pointer to the better win32file.GetFullPathName function Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** win32apimodule.cpp 27 Aug 2010 02:47:20 -0000 1.102 --- win32apimodule.cpp 30 Aug 2010 02:44:17 -0000 1.103 *************** *** 2792,2795 **** --- 2792,2796 ---- // @pymethod string|win32api|GetFullPathName|Returns the full path of a (possibly relative) path + // @comm Please use <om win32file.GetFullPathName> instead - it has better Unicode semantics. static PyObject * PyGetFullPathName (PyObject *self, PyObject *args) |
From: Mark H. <mha...@us...> - 2010-08-30 02:40:23
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1765 Modified Files: setup.py Log Message: enable DDE module for 64bit builds Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.111 retrieving revision 1.112 diff -C2 -d -r1.111 -r1.112 *** setup.py 27 Aug 2010 06:53:44 -0000 1.111 --- setup.py 30 Aug 2010 02:40:15 -0000 1.112 *************** *** 1838,1842 **** WinExt_pythonwin("dde", pch_header="stdafxdde.h", depends=["win32/src/stddde.h", "pythonwin/ddemodule.h"], - platforms=['win32'], optional_headers=['afxres.h']), ] --- 1838,1841 ---- |
From: Mark H. <mha...@us...> - 2010-08-30 02:34:38
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1166/Demos Added Files: win32clipboard_bitmapdemo.py Log Message: Add support for CF_BITMAP and demo clipboard viewer to test --- NEW FILE: win32clipboard_bitmapdemo.py --- import win32gui import win32api import win32clipboard import win32con import time class ViewerWindow: def __init__(self): self.hwndNextViewer = None def OnPaint(self, hwnd, msg, wp, lp): dc, ps=win32gui.BeginPaint(hwnd) wndrect = win32gui.GetClientRect(hwnd) wndwidth = wndrect[2]-wndrect[0] wndheight = wndrect[3]-wndrect[1] win32clipboard.OpenClipboard() try: try: hbitmap = win32clipboard.GetClipboardData(win32clipboard.CF_BITMAP) except TypeError: font=win32gui.LOGFONT() font.lfHeight=15 #int(wndheight/20) font.lfWidth=15 #font.lfHeight # font.lfWeight=150 hf=win32gui.CreateFontIndirect(font) win32gui.SelectObject(dc,hf) win32gui.SetBkMode(dc, win32con.TRANSPARENT) win32gui.SetTextColor(dc,win32api.RGB(0,0,0)) win32gui.DrawText(dc,'No bitmaps are in the clipboard\n(try pressing the PrtScn button)', -1, (0,0, wndwidth, wndheight), win32con.DT_CENTER) else: bminfo = win32gui.GetObject(hbitmap) dcDC = win32gui.CreateCompatibleDC(None) win32gui.SelectObject(dcDC, hbitmap) win32gui.StretchBlt(dc, 0, 0, wndwidth, wndheight, dcDC, 0, 0, bminfo.bmWidth, bminfo.bmHeight, win32con.SRCCOPY) win32gui.DeleteDC(dcDC) win32gui.EndPaint(hwnd, ps) finally: win32clipboard.CloseClipboard() return 0 def OnDrawClipboard(self, hwnd, msg, wp, lp): win32gui.InvalidateRect(hwnd,None,True) def OnChangeCBChain(self, hwnd, msg, wp, lp): # If the next window is closing, repair the chain. if wp == self.hwndNextViewer: self.hwndNextViewer = lp # Otherwise, pass the message to the next link. elif self.hwndNextViewer: win32gui.SendMessage(self.hwndNextViewer, msg, wp, lp) def OnCreate(self, hwnd, msg, wp, lp): self.hwndNextViewer = win32gui.SetClipboardViewer(hwnd); def OnClose(self, hwnd, msg, wp, lp): win32clipboard.ChangeClipboardChain(hwnd, self.hwndNextViewer) win32gui.DestroyWindow(hwnd) win32gui.PostQuitMessage(0) def go(self): wndproc={win32con.WM_PAINT: self.OnPaint, win32con.WM_CLOSE: self.OnClose, win32con.WM_CREATE: self.OnCreate, win32con.WM_DRAWCLIPBOARD: self.OnDrawClipboard, win32con.WM_CHANGECBCHAIN: self.OnChangeCBChain, } wc = win32gui.WNDCLASS() wc.lpszClassName = 'test_win32clipboard_bmp' wc.style = win32con.CS_GLOBALCLASS|win32con.CS_VREDRAW | win32con.CS_HREDRAW wc.hbrBackground = win32con.COLOR_WINDOW+1 wc.lpfnWndProc=wndproc class_atom=win32gui.RegisterClass(wc) hwnd = win32gui.CreateWindowEx(0, class_atom,'ClipboardViewer', win32con.WS_CAPTION|win32con.WS_VISIBLE|win32con.WS_THICKFRAME|win32con.WS_SYSMENU, 100,100,900,900, 0, 0, 0, None) win32clipboard.SetClipboardViewer(hwnd) win32gui.PumpMessages() win32gui.UnregisterClass(class_atom,None) if __name__=='__main__': w = ViewerWindow() w.go() |
From: Mark H. <mha...@us...> - 2010-08-30 02:34:38
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1166/src Modified Files: win32clipboardmodule.cpp Log Message: Add support for CF_BITMAP and demo clipboard viewer to test Index: win32clipboardmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** win32clipboardmodule.cpp 3 Jan 2009 06:43:58 -0000 1.26 --- win32clipboardmodule.cpp 30 Aug 2010 02:34:29 -0000 1.27 *************** *** 342,345 **** --- 342,347 ---- DWORD dwordsize; switch (format) { + case CF_BITMAP: + break; case CF_HDROP: hdrop = (HDROP)GlobalLock(handle); *************** *** 393,396 **** --- 395,401 ---- } switch (format) { + case CF_BITMAP: + ret = PyWinLong_FromHANDLE(handle); + break; case CF_HDROP: filecnt = DragQueryFileW(hdrop, 0xFFFFFFFF, NULL, NULL); *************** *** 460,463 **** --- 465,469 ---- // @flag CF_ENHMETAFILE|A string with binary data obtained from GetEnhMetaFileBits // @flag CF_METAFILEPICT|A string with binary data obtained from GetMetaFileBitsEx (currently broken) + // @flag CF_BITMAP|An integer handle to the bitmap. // @flag All other formats|A string with binary data obtained directly from the // global memory referenced by the handle. |
From: Mark H. <mha...@us...> - 2010-08-30 00:52:23
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23040 Modified Files: genpy.py Log Message: avoid generating invalid constants class for some objects Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** genpy.py 3 Jun 2010 18:40:23 -0000 1.67 --- genpy.py 30 Aug 2010 00:52:15 -0000 1.68 *************** *** 195,198 **** --- 195,199 ---- def WriteEnumerationItems(self, stream): + num = 0 enumName = self.doc[0] # Write in name alpha order *************** *** 216,219 **** --- 217,222 ---- print >> stream, "\t%-30s=%-10s # from enum %s" % \ (build.MakePublicAttributeName(name, True), use, enumName) + num += 1 + return num class VTableItem(build.VTableItem, WritableItem): *************** *** 869,875 **** items = enumItems.values() items.sort() for oleitem in items: ! oleitem.WriteEnumerationItems(stream) self.progress.Tick() print >> stream --- 872,881 ---- items = enumItems.values() items.sort() + num_written = 0 for oleitem in items: ! num_written += oleitem.WriteEnumerationItems(stream) self.progress.Tick() + if not num_written: + print >> stream, "\tpass" print >> stream |
From: Mark H. <mha...@us...> - 2010-08-30 00:35:16
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21646/idle Modified Files: AutoIndent.py Log Message: all trailing space stripped on enter (smichr via patch 2857646) Index: AutoIndent.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/AutoIndent.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AutoIndent.py 28 Jan 2010 20:44:11 -0000 1.9 --- AutoIndent.py 30 Aug 2010 00:35:07 -0000 1.10 *************** *** 209,213 **** if i == n: # the cursor is in or at leading indentation; just inject ! # an empty line at the start text.insert("insert linestart", '\n') return "break" --- 209,214 ---- if i == n: # the cursor is in or at leading indentation; just inject ! # an empty line at the start and strip space from current line ! text.delete("insert - %d chars" % i, "insert") text.insert("insert linestart", '\n') return "break" |
From: Mark H. <mha...@us...> - 2010-08-27 07:37:32
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31094 Modified Files: CHANGES.txt Log Message: styling tweaks in interactive windows (markt) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** CHANGES.txt 27 Aug 2010 07:32:02 -0000 1.60 --- CHANGES.txt 27 Aug 2010 07:37:23 -0000 1.61 *************** *** 56,59 **** --- 56,62 ---- 3002383) + * Pythonwin: if the interactive window is cleared, avoid the blue color and + large font on the new line (markt via patch 2813056) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-08-27 07:37:31
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31094/pythonwin/pywin/framework Modified Files: interact.py Log Message: styling tweaks in interactive windows (markt) Index: interact.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** interact.py 26 Aug 2010 02:00:16 -0000 1.24 --- interact.py 27 Aug 2010 07:37:23 -0000 1.25 *************** *** 95,98 **** --- 95,99 ---- def __init__(self, scintilla): FormatterParent.__init__(self, scintilla) + self.bannerDisplayed = False def SetStyles(self): *************** *** 234,239 **** --- 235,243 ---- stylenum = self.scintilla.SCIGetStyleAt(start - 1) styleStart = self.GetStyleByNum(stylenum).name + elif self.bannerDisplayed: + styleStart = STYLE_INTERACTIVE_EOL else: styleStart = STYLE_INTERACTIVE_BANNER + self.bannerDisplayed = True self.scintilla.SCIStartStyling(start, 31) self.style_buffer = array.array("b", (0,)*len(stringVal)) |
From: Mark H. <mha...@us...> - 2010-08-27 07:32:10
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30327 Modified Files: CHANGES.txt Log Message: Get vtable interfaces working on 64bit windows (Nikolay Igotti) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** CHANGES.txt 27 Aug 2010 06:47:52 -0000 1.59 --- CHANGES.txt 27 Aug 2010 07:32:02 -0000 1.60 *************** *** 53,56 **** --- 53,59 ---- * Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832) + * Get vtable interfaces working on 64bit windows (Nikolay Igotti via patch + 3002383) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-08-27 07:32:10
|
Update of /cvsroot/pywin32/pywin32/com/win32com In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30327/com/win32com Modified Files: universal.py Log Message: Get vtable interfaces working on 64bit windows (Nikolay Igotti) Index: universal.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/universal.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** universal.py 2 Oct 2008 12:09:53 -0000 1.14 --- universal.py 27 Aug 2010 07:32:02 -0000 1.15 *************** *** 163,166 **** --- 163,168 ---- def vtbl_argsizes(self): return [m.cbArgs for m in self._methods] + def vtbl_argcounts(self): + return [len(m.args) for m in self._methods] def dispatch(self, ob, index, argPtr, ReadFromInTuple=_univgw.ReadFromInTuple, |
From: Mark H. <mha...@us...> - 2010-08-27 07:32:10
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30327/com/win32com/src Modified Files: univgw.cpp Log Message: Get vtable interfaces working on 64bit windows (Nikolay Igotti) Index: univgw.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/univgw.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** univgw.cpp 4 Feb 2009 02:34:24 -0000 1.13 --- univgw.cpp 27 Aug 2010 07:32:02 -0000 1.14 *************** *** 169,173 **** ! static pfnGWMethod make_method(DWORD index, UINT argsize) { unsigned char * code; --- 169,173 ---- ! static pfnGWMethod make_method(DWORD index, UINT argsize, UINT argc) { unsigned char * code; *************** *** 234,239 **** return NULL; } ! #else // _M_IX86 /* The MAINWIN toolkit allows us to build this on Linux!!! */ # pragma message("XXXXXXXXX - win32com.universal wont work on this platform - need make_method") --- 234,278 ---- return NULL; } + #elif _M_X64 + static const unsigned char wrapper[] = { + 0x48, 0x89, 0x54, 0x24, 0x10, /* mov [rsp + 16], rdx */ + 0x4c, 0x89, 0x44, 0x24, 0x18, /* mov [rsp + 24], r8 */ + 0x4c, 0x89, 0x4c, 0x24, 0x20, /* mov [rsp + 32], r9 */ ! 0x48, 0x89, 0xca, /* mov rdx, rcx */ ! 0x4c, 0x8d, 0x44, 0x24, 0x10, /* lea r8, [rsp + 16] */ ! 0x48, 0x83, 0xec, 0x28, /* sub rsp, 40 - we have to keep stack 16-byte aligned */ ! 0x48, 0xc7, 0xc1, 0x00, 0x00, 0x00, 0x00, /* mov rcx, imm32 */ ! 0x48, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* mov rax, imm64, target address */ ! 0xff, 0xd0, /* call rax */ ! 0x48, 0x83, 0xc4, 0x28, /* add rsp, 40 */ ! 0xc3 /* ret */ ! }; ! ! code = (unsigned char *)VirtualAlloc(NULL, sizeof(wrapper), MEM_COMMIT, PAGE_READWRITE); ! if (code==NULL) { ! PyErr_NoMemory(); ! return NULL; // caller sets memory error ! } ! memcpy(code, &wrapper[0], sizeof(wrapper)); ! ! for (int i=0; i < 3; i++) ! { ! if (i < argc) ! continue; ! for (int j = 0; j < 5; j++) ! code[i*5+j] = 0x90; ! } ! ! *(int*)(code+30) = index; ! *(void**)(code+36) = &univgw_dispatch; ! ! DWORD oldprotect; ! if (!VirtualProtect(code, sizeof(wrapper), PAGE_EXECUTE, &oldprotect)) { ! VirtualFree(code, 0, MEM_RELEASE); ! PyErr_SetString(PyExc_RuntimeError, "failed to set memory attributes to executable"); ! return NULL; ! } ! #else // other arches /* The MAINWIN toolkit allows us to build this on Linux!!! */ # pragma message("XXXXXXXXX - win32com.universal wont work on this platform - need make_method") *************** *** 369,372 **** --- 408,415 ---- return NULL; } + PyObject * methodsArgc = PyObject_CallMethod(obDef, "vtbl_argcounts", NULL); + if ( methodsArgc == NULL ) + return NULL; + int numReservedVtables = 3; // the methods list should not specify IUnknown methods *************** *** 418,421 **** --- 461,468 ---- goto error; + PyObject * obArgCount = PySequence_GetItem(methodsArgc, i); + if ( obArgCount == NULL ) + goto error; + int argSize = PyInt_AsLong(obArgSize); Py_DECREF(obArgSize); *************** *** 423,429 **** goto error; // dynamically construct a function with the provided argument // size; reserve additional space for the _this argument. ! pfnGWMethod meth = make_method(i, argSize + sizeof(gw_object *)); if ( meth == NULL ) goto error; --- 470,480 ---- goto error; + int argCount = PyInt_AsLong(obArgCount); + Py_DECREF(obArgCount); + if ( argCount == -1 && PyErr_Occurred() ) + goto error; // dynamically construct a function with the provided argument // size; reserve additional space for the _this argument. ! pfnGWMethod meth = make_method(i, argSize + sizeof(void*), argCount + 1); if ( meth == NULL ) goto error; *************** *** 432,435 **** --- 483,488 ---- } Py_DECREF(methods); + Py_DECREF(methodsArgc); + DWORD oldprotect; if (!VirtualProtect(vtbl, size, PAGE_EXECUTE, &oldprotect)) { |
From: Mark H. <mha...@us...> - 2010-08-27 06:53:52
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25640 Modified Files: setup.py Log Message: support setup.py --prefix=... Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** setup.py 14 May 2010 22:31:15 -0000 1.110 --- setup.py 27 Aug 2010 06:53:44 -0000 1.111 *************** *** 1284,1288 **** # We must run the script we just installed into Scripts, as it # may have had 2to3 run over it. ! filename = os.path.join(sys.prefix, "Scripts", "pywin32_postinstall.py") if not os.path.isfile(filename): raise RuntimeError("Can't find '%s'" % (filename,)) --- 1284,1288 ---- # We must run the script we just installed into Scripts, as it # may have had 2to3 run over it. ! filename = os.path.join(self.prefix, "Scripts", "pywin32_postinstall.py") if not os.path.isfile(filename): raise RuntimeError("Can't find '%s'" % (filename,)) |
From: Mark H. <mha...@us...> - 2010-08-27 06:48:01
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24893/win32/test Modified Files: test_win32file.py Log Message: Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832) Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** test_win32file.py 16 Feb 2009 03:58:18 -0000 1.33 --- test_win32file.py 27 Aug 2010 06:47:53 -0000 1.34 *************** *** 794,797 **** --- 794,937 ---- + class TestWSAEnumNetworkEvents(unittest.TestCase): + + def test_basics(self): + s = socket.socket() + e = win32event.CreateEvent(None, 1, 0, None) + win32file.WSAEventSelect(s, e, 0) + self.assertEquals(win32file.WSAEnumNetworkEvents(s), {}) + self.assertEquals(win32file.WSAEnumNetworkEvents(s, e), {}) + self.assertRaises(TypeError, win32file.WSAEnumNetworkEvents, s, e, 3) + self.assertRaises(TypeError, win32file.WSAEnumNetworkEvents, s, "spam") + self.assertRaises(TypeError, win32file.WSAEnumNetworkEvents, "spam", e) + self.assertRaises(TypeError, win32file.WSAEnumNetworkEvents, "spam") + f = open("NUL") + h = win32file._get_osfhandle(f.fileno()) + self.assertRaises(win32file.error, win32file.WSAEnumNetworkEvents, h) + self.assertRaises(win32file.error, win32file.WSAEnumNetworkEvents, s, h) + try: + win32file.WSAEnumNetworkEvents(h) + except win32file.error, e: + self.assertEquals(e.winerror, win32file.WSAENOTSOCK) + try: + win32file.WSAEnumNetworkEvents(s, h) + except win32file.error, e: + # According to the docs it would seem reasonable that + # this would fail with WSAEINVAL, but it doesn't. + self.assertEquals(e.winerror, win32file.WSAENOTSOCK) + + def test_functional(self): + # This is not really a unit test, but it does exercise the code + # quite well and can serve as an example of WSAEventSelect and + # WSAEnumNetworkEvents usage. + port = socket.socket() + port.setblocking(0) + port_event = win32event.CreateEvent(None, 0, 0, None) + win32file.WSAEventSelect(port, port_event, + win32file.FD_ACCEPT | + win32file.FD_CLOSE) + port.bind(("127.0.0.1", 0)) + port.listen(10) + + client = socket.socket() + client.setblocking(0) + client_event = win32event.CreateEvent(None, 0, 0, None) + win32file.WSAEventSelect(client, client_event, + win32file.FD_CONNECT | + win32file.FD_READ | + win32file.FD_WRITE | + win32file.FD_CLOSE) + err = client.connect_ex(port.getsockname()) + self.assertEquals(err, win32file.WSAEWOULDBLOCK) + + res = win32event.WaitForSingleObject(port_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(port, port_event) + self.assertEquals(events, {win32file.FD_ACCEPT: 0}) + + server, addr = port.accept() + server.setblocking(0) + server_event = win32event.CreateEvent(None, 1, 0, None) + win32file.WSAEventSelect(server, server_event, + win32file.FD_READ | + win32file.FD_WRITE | + win32file.FD_CLOSE) + res = win32event.WaitForSingleObject(server_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(server, server_event) + self.assertEquals(events, {win32file.FD_WRITE: 0}) + + res = win32event.WaitForSingleObject(client_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(client, client_event) + self.assertEquals(events, {win32file.FD_CONNECT: 0, + win32file.FD_WRITE: 0}) + sent = 0 + data = "x" * 16 * 1024 + while sent < 16 * 1024 * 1024: + try: + sent += client.send(data) + except socket.error, e: + if e.args[0] == win32file.WSAEINTR: + continue + elif e.args[0] in (win32file.WSAEWOULDBLOCK, win32file.WSAENOBUFS): + break + else: + raise + else: + self.fail("could not find socket buffer limit") + + events = win32file.WSAEnumNetworkEvents(client) + self.assertEquals(events, {}) + + res = win32event.WaitForSingleObject(server_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(server, server_event) + self.assertEquals(events, {win32file.FD_READ: 0}) + + received = 0 + while received < sent: + try: + received += len(server.recv(16 * 1024)) + except socket.error, e: + if e.args[0] in [win32file.WSAEINTR, win32file.WSAEWOULDBLOCK]: + continue + else: + raise + + self.assertEquals(received, sent) + events = win32file.WSAEnumNetworkEvents(server) + self.assertEquals(events, {}) + + res = win32event.WaitForSingleObject(client_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(client, client_event) + self.assertEquals(events, {win32file.FD_WRITE: 0}) + + client.shutdown(socket.SHUT_WR) + res = win32event.WaitForSingleObject(server_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + # strange timing issues... + for i in range(5): + events = win32file.WSAEnumNetworkEvents(server, server_event) + if events: break + win32api.Sleep(100) + else: + raise AssertionError("failed to get events") + self.assertEquals(events, {win32file.FD_CLOSE: 0}) + events = win32file.WSAEnumNetworkEvents(client) + self.assertEquals(events, {}) + + server.close() + res = win32event.WaitForSingleObject(client_event, 1000) + self.assertEquals(res, win32event.WAIT_OBJECT_0) + events = win32file.WSAEnumNetworkEvents(client, client_event) + self.assertEquals(events, {win32file.FD_CLOSE: 0}) + + client.close() + events = win32file.WSAEnumNetworkEvents(port) + self.assertEquals(events, {}) + + if __name__ == '__main__': testmain() |
From: Mark H. <mha...@us...> - 2010-08-27 06:48:01
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24893 Modified Files: CHANGES.txt Log Message: Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** CHANGES.txt 27 Aug 2010 02:47:19 -0000 1.58 --- CHANGES.txt 27 Aug 2010 06:47:52 -0000 1.59 *************** *** 51,54 **** --- 51,56 ---- * New win32api functions GetKeyboardLayoutName, MapVirtualKey and ToAsciiEx + * Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-08-27 06:48:01
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24893/win32/src Modified Files: win32file.i Log Message: Add win32file.WSAEnumNetworkEvents (Ziga Seilnacht via patch 3022832) Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** win32file.i 6 Jun 2010 08:05:45 -0000 1.109 --- win32file.i 27 Aug 2010 06:47:53 -0000 1.110 *************** *** 2264,2267 **** --- 2264,2357 ---- LONG lNetworkEvents // @pyparm int|networkEvents||A bitmask of network events that will cause hEvent to be signaled. e.g. (FD_CLOSE \| FD_READ) ); + + %native(WSAEnumNetworkEvents) MyWSAEnumNetworkEvents; + + %{ + static int + MyCopyEvent(PyObject *dict, WSANETWORKEVENTS *events, long event, int eventbit) + { + int res = 0; + + if (events->lNetworkEvents & event) + { + PyObject *key, *value; + + key = PyInt_FromLong(event); + if (key == NULL) + { + return -1; + } + value = PyInt_FromLong(events->iErrorCode[eventbit]); + if (value == NULL) + { + Py_DECREF(key); + return -1; + } + res = PyDict_SetItem(dict, key, value); + Py_DECREF(key); + Py_DECREF(value); + } + return res; + } + + // @pyswig dict|WSAEnumNetworkEvents|Return network events that caused the event associated with the socket to be signaled. + // @rdesc A dictionary mapping network events that occured for the specified socket since the last call to this function (e.g. FD_READ, FD_WRITE) to their associated error code, or 0 if the event occured without an error. The events returned are a subset of events previously registered for this socket with WSAEventSelect. + static PyObject* + MyWSAEnumNetworkEvents(PyObject *self, PyObject *args) + { + PyObject *socket, *event = NULL; + // @pyparm <o PySocket>|s||Socket to check for netork events, previously registered for network event notification with WSAEventSelect. + SOCKET s; + // @pyparm <o PyHANDLE>|hEvent||Optional handle to the event associated with socket s in the last call to WSAEventSelect. If specified, the event will be reset. + HANDLE hEvent = NULL; + WSANETWORKEVENTS wsaevents; + int rc; + PyObject *events; + + if (!PyArg_ParseTuple(args, "O|O:WSAEnumNetworkEvents", &socket, &event)) + { + return NULL; + } + if (!PySocket_AsSOCKET(socket, &s)) + { + return NULL; + } + if (event != NULL && !PyWinObject_AsHANDLE(event, &hEvent)) + { + return NULL; + } + + Py_BEGIN_ALLOW_THREADS; + rc = WSAEnumNetworkEvents(s, hEvent, &wsaevents); + Py_END_ALLOW_THREADS; + if (rc == SOCKET_ERROR) + { + PyWin_SetAPIError("WSAEnumNetworkEvents", WSAGetLastError()); + return NULL; + } + + events = PyDict_New(); + if (events == NULL) + { + return NULL; + } + if (MyCopyEvent(events, &wsaevents, FD_READ, FD_READ_BIT) || + MyCopyEvent(events, &wsaevents, FD_WRITE, FD_WRITE_BIT) || + MyCopyEvent(events, &wsaevents, FD_OOB, FD_OOB_BIT) || + MyCopyEvent(events, &wsaevents, FD_ACCEPT, FD_ACCEPT_BIT) || + MyCopyEvent(events, &wsaevents, FD_CONNECT, FD_CONNECT_BIT) || + MyCopyEvent(events, &wsaevents, FD_CLOSE, FD_CLOSE_BIT) || + MyCopyEvent(events, &wsaevents, FD_QOS, FD_QOS_BIT) || + MyCopyEvent(events, &wsaevents, FD_GROUP_QOS, FD_GROUP_QOS_BIT) || + MyCopyEvent(events, &wsaevents, FD_ROUTING_INTERFACE_CHANGE, FD_ROUTING_INTERFACE_CHANGE_BIT) || + MyCopyEvent(events, &wsaevents, FD_ADDRESS_LIST_CHANGE, FD_ADDRESS_LIST_CHANGE_BIT)) + { + Py_DECREF(events); + return NULL; + } + return events; + } + %} + %{ *************** *** 2515,2518 **** --- 2605,2609 ---- #define WSAECONNABORTED WSAECONNABORTED #define WSAECONNRESET WSAECONNRESET + #define WSAENOBUFS WSAENOBUFS #define WSAEDISCON WSAEDISCON #define WSA_IO_PENDING WSA_IO_PENDING |
From: Mark H. <mha...@us...> - 2010-08-27 02:47:28
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv439/win32/src Modified Files: win32apimodule.cpp Log Message: New win32api functions GetKeyboardLayoutName, MapVirtualKey and ToAsciiEx Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** win32apimodule.cpp 25 Aug 2010 07:34:59 -0000 1.101 --- win32apimodule.cpp 27 Aug 2010 02:47:20 -0000 1.102 *************** *** 5956,5959 **** --- 5956,5970 ---- } + // @pymethod int|win32api|GetKeyboardLayoutName|Retrieves the name of the active input locale identifier (formerly called the keyboard layout). + PyObject *PyGetKeyboardLayoutName(PyObject *self, PyObject *args) + { + if (!PyArg_ParseTuple(args,":GetKeyboardLayoutName")) + return NULL; + WCHAR buf[KL_NAMELENGTH+1]; + if (!::GetKeyboardLayoutNameW(buf)) + return PyWin_SetAPIError("GetKeyboardLayoutNameW"); + return PyWinObject_FromWCHAR(buf); + } + // @pymethod (int,..)|win32api|GetKeyboardLayoutList|Returns a sequence of all locale ids currently loaded PyObject *PyGetKeyboardLayoutList(PyObject *self, PyObject *args) *************** *** 6009,6012 **** --- 6020,6076 ---- } + // @pymethod bytes|win32api|ToAsciiEx|Translates the specified virtual-key code and keyboard state to the corresponding character or characters. + PyObject *PyToAsciiEx(PyObject *self, PyObject *args) + { + UINT vk, sc, flags=0; + const char *state; + int statesize; + PyObject *obhlayout = NULL; + HKL layout = 0; + // @pyparm int|vk||The virtual key code. + // @pyparm int|scancode||The scan code. + // @pyparm bytes|keyboardstate||A string of exactly 256 characters. + // @pyparm int|flags|0| + // @pyparm handle|hlayout|None|The keyboard layout to use + if (!PyArg_ParseTuple(args, "iis#|iO", &vk, &sc, &state, &statesize, &flags, obhlayout)) + return NULL; + if (statesize!=256) + return PyErr_Format(PyExc_ValueError, "keyboard state string must be exactly 256 characters"); + if (obhlayout && !PyWinObject_AsHANDLE(obhlayout, (HANDLE *)&layout)) + return NULL; + char result[2]; + int nc = ToAsciiEx(vk,sc,(BYTE *)state,(unsigned short *)result,flags,layout); + if (nc < 0) { // a dead char. + Py_INCREF(Py_None); + return Py_None; + } + return PyString_FromStringAndSize(result, nc); + } + + // @pymethod int|win32api|MapVirtualKey|Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code. + // @comm implemented by calling the unicode versions of the API (MapVirtualKeyW/MapVirtualKeyExW) + PyObject *PyMapVirtualKey(PyObject *self, PyObject *args) + { + UINT vk, typ; + PyObject *obhlayout = NULL; + HKL layout = 0; + // @pyparm int|vk||The virtual key code. + // @pyparm int|type||The type of conversion to make - see the API + // @pyparm handle|hlayout|None|The keyboard layout to use. If not + // specified, the API function MapVirtualKey will be called. If it + // is specified MapVirtualKeyEx will be called. + if (!PyArg_ParseTuple(args, "ii|O", &vk, &typ, obhlayout)) + return NULL; + int rc; + if (obhlayout==NULL) { + rc = MapVirtualKeyW(vk, typ); + } else{ + if (!PyWinObject_AsHANDLE(obhlayout, (HANDLE *)&layout)) + return NULL; + rc = MapVirtualKeyExW(vk, typ, layout); + } + return PyInt_FromLong(rc); + } + // @pymethod dict|win32api|GlobalMemoryStatus|Returns systemwide memory usage // @rdesc Returns a dictionary representing a MEMORYSTATUS structure *************** *** 6208,6211 **** --- 6272,6276 ---- {"GetKeyboardLayout", PyGetKeyboardLayout, 1}, // @pymeth GetKeyboardLayout|Retrieves the active input locale identifier {"GetKeyboardLayoutList", PyGetKeyboardLayoutList, 1}, // @pymeth GetKeyboardLayoutList|Returns a sequence of all locale ids in the system + {"GetKeyboardLayoutName", PyGetKeyboardLayoutName, 1}, // @pymeth GetKeyboardLayoutName|Retrieves the name of the active input locale identifier (formerly called the keyboard layout). {"GetKeyboardState", PyGetKeyboardState, 1}, // @pymeth GetKeyboardState|Retrieves the status of the 256 virtual keys on the keyboard. {"GetKeyState", PyGetKeyState, 1}, // @pymeth GetKeyState|Retrives the last known key state for a key. *************** *** 6269,6272 **** --- 6334,6338 ---- {"LoadResource", PyLoadResource,1}, // @pymeth LoadResource|Finds and loads a resource from a PE file. {"LoadString", PyLoadString,1}, // @pymeth LoadString|Loads a string from a resource file. + {"MapVirtualKey", PyMapVirtualKey,1}, // @pymeth MapVirtualKeyEx|Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code. {"MessageBeep", PyMessageBeep,1}, // @pymeth MessageBeep|Plays a predefined waveform sound. {"MessageBoxEx", PyMessageBox, 1}, *************** *** 6349,6352 **** --- 6415,6419 ---- {"SleepEx", PySleep, 1}, // @pymeth Sleep|Suspends current application execution {"TerminateProcess", PyTerminateProcess, 1}, // @pymeth TerminateProcess|Terminates a process. + {"ToAsciiEx", PyToAsciiEx, 1}, // @pymeth ToAsciiEx|Translates the specified virtual-key code and keyboard state to the corresponding character or characters. {"Unicode", PyWin_NewUnicode, 1}, // @pymeth Unicode|Creates a new <o PyUnicode> object {"UpdateResource", PyUpdateResource, 1 }, // @pymeth UpdateResource|Updates a resource in a PE file. |
From: Mark H. <mha...@us...> - 2010-08-27 02:47:28
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv439 Modified Files: CHANGES.txt Log Message: New win32api functions GetKeyboardLayoutName, MapVirtualKey and ToAsciiEx Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** CHANGES.txt 26 Aug 2010 02:00:15 -0000 1.57 --- CHANGES.txt 27 Aug 2010 02:47:19 -0000 1.58 *************** *** 49,52 **** --- 49,54 ---- (kxroberto) + * New win32api functions GetKeyboardLayoutName, MapVirtualKey and ToAsciiEx + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-08-26 02:00:24
|
Update of /cvsroot/pywin32/pywin32 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24148 Modified Files: CHANGES.txt Log Message: Pythonwin: PYTHONSTARTUP is honoured, just like when using python.exe (kxroberto) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** CHANGES.txt 25 Aug 2010 07:48:54 -0000 1.56 --- CHANGES.txt 26 Aug 2010 02:00:15 -0000 1.57 *************** *** 46,49 **** --- 46,52 ---- extensions (kxroberto) + * Pythonwin: PYTHONSTARTUP is honoured, just like when using python.exe + (kxroberto) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2010-08-26 02:00:24
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24148/pythonwin/pywin/framework Modified Files: interact.py Log Message: Pythonwin: PYTHONSTARTUP is honoured, just like when using python.exe (kxroberto) Index: interact.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** interact.py 10 Jul 2009 05:30:00 -0000 1.23 --- interact.py 26 Aug 2010 02:00:16 -0000 1.24 *************** *** 289,292 **** --- 289,300 ---- else: sys.stderr.write(banner) + rcfile = os.environ.get('PYTHONSTARTUP') + if rcfile: + import __main__ + try: + execfile(rcfile, __main__.__dict__, __main__.__dict__) + except: + sys.stderr.write(">>> \nError executing PYTHONSTARTUP script %r\n" % (rcfile)) + traceback.print_exc(file=sys.stderr) self.AppendToPrompt([]) |
From: Mark H. <mha...@us...> - 2010-08-25 07:55:18
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv29730 Modified Files: config.py Log Message: ensure tracebacks loading config files contain correct line number (kxroberto) Index: config.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/config.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** config.py 6 Dec 2008 00:40:52 -0000 1.9 --- config.py 25 Aug 2010 07:55:10 -0000 1.10 *************** *** 280,284 **** lines.append(line) try: ! c = compile("".join(lines), self.filename, "exec") self._save_data("extension code", c) except SyntaxError, details: --- 280,286 ---- lines.append(line) try: ! c = compile( ! "\n" * start_lineno + # produces correct tracebacks ! "".join(lines), self.filename, "exec") self._save_data("extension code", c) except SyntaxError, details: |