pywin32-checkins Mailing List for Python for Windows Extensions (Page 123)
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...> - 2004-10-09 01:42:17
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1340 Modified Files: test_win32file.py Log Message: Test code via [ 979270 ] SetFilePointer fails with negative offset (even though the bug was previously fixed) Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_win32file.py 8 Oct 2004 23:16:27 -0000 1.4 --- test_win32file.py 9 Oct 2004 01:42:01 -0000 1.5 *************** *** 74,77 **** --- 74,115 ---- self.failUnless(not os.path.isfile(testName), "After closing the file, it still exists!") + def testFilePointer(self): + # via [ 979270 ] SetFilePointer fails with negative offset + + # Create a file in the %TEMP% directory. + filename = os.path.join( win32api.GetTempPath(), "win32filetest.dat" ) + + f = win32file.CreateFile(filename, + win32file.GENERIC_READ|win32file.GENERIC_WRITE, + 0, + None, + win32file.CREATE_ALWAYS, + win32file.FILE_ATTRIBUTE_NORMAL, + 0) + try: + #Write some data + data = 'Some data' + (res, written) = win32file.WriteFile(f, data) + + self.failIf(res) + self.assertEqual(written, len(data)) + + #Move at the beginning and read the data + win32file.SetFilePointer(f, 0, win32file.FILE_BEGIN) + (res, s) = win32file.ReadFile(f, len(data)) + + self.failIf(res) + self.assertEqual(s, data) + + #Move at the end and read the data + win32file.SetFilePointer(f, -len(data), win32file.FILE_END) + (res, s) = win32file.ReadFile(f, len(data)) + + self.failIf(res) + self.failUnlessEqual(s, data) + finally: + f.Close() + os.unlink(filename) + class TestOverlapped(unittest.TestCase): def testSimpleOverlapped(self): |
From: Mark H. <mha...@us...> - 2004-10-09 01:33:58
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32361 Modified Files: control.py Log Message: Fix [ 982700 ] unicode default arguments raises an error Index: control.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/control.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** control.py 7 Oct 2004 08:54:01 -0000 1.13 --- control.py 9 Oct 2004 01:33:48 -0000 1.14 *************** *** 200,203 **** --- 200,208 ---- def SCICallTipShow(self, text, pos=-1): if pos==-1: pos = self.GetSel()[0] + if isinstance(text, unicode): + # I'm really not sure what the correct encoding + # to use is - but it has gotta be better than total + # failure due to the array module + text = text.encode("mbcs") buff = array.array('c', text + "\0") addressBuffer = buff.buffer_info()[0] |
From: Mark H. <mha...@us...> - 2004-10-09 01:21:04
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30140 Modified Files: shell.cpp Log Message: SHEmptyRecycleBin was missing the calling convention decl, so crashed at exit. [ 979641 ] win32com.shell.shell.SHEmptyRecycleBin crashes on Win XP Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** shell.cpp 2 Jul 2004 04:11:44 -0000 1.28 --- shell.cpp 9 Oct 2004 01:20:48 -0000 1.29 *************** *** 1166,1170 **** ! // @pymethod <o PyIDL>|shell|SHEmptyRecycleBin|Empties the recycle bin on the specified drive. static PyObject *PySHEmptyRecycleBin(PyObject *self, PyObject *args) { --- 1166,1170 ---- ! // @pymethod |shell|SHEmptyRecycleBin|Empties the recycle bin on the specified drive. static PyObject *PySHEmptyRecycleBin(PyObject *self, PyObject *args) { *************** *** 1178,1182 **** return NULL; ! typedef HRESULT (* PFNSHEmptyRecycleBin)(HWND, LPSTR, DWORD ); // @comm This method is only available in shell version 4.71. If the function is not available, a COM Exception with HRESULT=E_NOTIMPL will be raised. HMODULE hmod = GetModuleHandle(TEXT("shell32.dll")); --- 1178,1182 ---- return NULL; ! typedef HRESULT (WINAPI * PFNSHEmptyRecycleBin)(HWND, LPSTR, DWORD ); // @comm This method is only available in shell version 4.71. If the function is not available, a COM Exception with HRESULT=E_NOTIMPL will be raised. HMODULE hmod = GetModuleHandle(TEXT("shell32.dll")); |
From: Mark H. <mha...@us...> - 2004-10-09 00:37:07
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22346 Modified Files: win32gui.i Log Message: * Fix memory leak whenever a MSG structure was passed from Python to Win32. * Move AnimateWindow to winxpgui so we win32gui still works on Windows NT * Add SetLayeredWindowAttributes and UpdateLayeredWindow to winxpgui Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** win32gui.i 8 Oct 2004 21:56:48 -0000 1.51 --- win32gui.i 9 Oct 2004 00:36:57 -0000 1.52 *************** *** 15,18 **** --- 15,19 ---- #define _WIN32_IE 0x0501 // to enable balloon notifications in Shell_NotifyIcon #ifdef WINXPGUI + #define _WIN32_WINNT 0x0501 // This changes the entire world for XP! #define ISOLATION_AWARE_ENABLED 1 *************** *** 29,32 **** --- 30,34 ---- #include "commctrl.h" #include "windowsx.h" // For edit control hacks. + #include "malloc.h" #ifdef MS_WINCE *************** *** 172,176 **** %typemap(python,in) MSG *INPUT { ! $target = (MSG *)calloc(1, sizeof(MSG)); if (!PyArg_ParseTuple($source, "iiiii(ii):MSG param for $name", &$target->hwnd, --- 174,178 ---- %typemap(python,in) MSG *INPUT { ! $target = (MSG *)_alloca(sizeof(MSG)); if (!PyArg_ParseTuple($source, "iiiii(ii):MSG param for $name", &$target->hwnd, *************** *** 289,292 **** --- 291,306 ---- %typemap(python,argout) POINT *BOTH = POINT *OUTPUT; + %typemap(python,in) SIZE *INPUT { + SIZE s; + if (PyTuple_Check($source)) { + if (PyArg_ParseTuple($source, "ll", &s.cx, &s.cy) == 0) { + return PyErr_Format(PyExc_TypeError, "%s: a SIZE must be a tuple of integers", "$name"); + } + $target = &s; + } else { + return PyErr_Format(PyExc_TypeError, "%s: a SIZE must be a tuple of integers", "$name"); + } + } + %typemap(python,argout) ICONINFO *OUTPUT { PyObject *o; *************** *** 315,318 **** --- 329,346 ---- } + %typemap(python,in) BLENDFUNCTION *INPUT { + BLENDFUNCTION bf; + if (PyTuple_Check($source)) { + if (PyArg_ParseTuple($source, "bbbb:" "$name" " tuple", + &bf.BlendOp, &bf.BlendFlags, + &bf.SourceConstantAlpha, &bf.AlphaFormat) == 0) { + return NULL; + } + $target = &bf; + } else { + return PyErr_Format(PyExc_TypeError, "%s: This param must be a tuple of four integers", "$name"); + } + } + %typemap(python,except) LRESULT { Py_BEGIN_ALLOW_THREADS *************** *** 1142,1146 **** --- 1170,1179 ---- %native(FlashWindowEx) PyFlashWindowEx; + // To avoid LoadLibrary etc (ie, keep my life simple) for functions + // that don't exist on NT, only put them in winxpgui. + %ifdef WINXPGUI + // @pyswig |AnimateWindow|Enables you to produce special effects when showing or hiding windows. There are three types of animation: roll, slide, and alpha-blended fade. + // @comm To avoid complications with Windows NT, this function only exists in winxpgui (not win32gui) BOOLAPI AnimateWindow( HWND hwnd, // @pyparm int|hwnd||handle to window *************** *** 1149,1152 **** --- 1182,1210 ---- ); + // @pyswig |UpdateLayeredWindow|Updates the position, size, shape, content, and translucency of a layered window. + // @comm To avoid complications with Windows NT, this function only exists in winxpgui (not win32gui) + BOOLAPI UpdateLayeredWindow( + HWND hwnd, // @pyparm int|hwnd||handle to layered window + HDC hdcDst, // @pyparm int|hdcDst||handle to screen DC + POINT *INPUT, // @pyparm (x,y)|pointDest||new screen position + SIZE *INPUT, // @pyparm (cx, cy)|size||new size of the layered window + HDC hdcSrc, // @pyparm int|hdcSrc||handle to surface DC + POINT *INPUT, // @pyparm (x,y)|pointSrc||layer position + COLORREF crKey, // @pyparm int|colorKey||color key + BLENDFUNCTION *INPUT, // @pyparm (int, int, int, int)|blend||blend function + DWORD dwFlags // @pyparm int|flags||options + ); + + // @pyswig |SetLayeredWindowAttributes|Sets the opacity and transparency color key of a layered window. + // @comm To avoid complications with Windows NT, this function only exists in winxpgui (not win32gui) + BOOLAPI SetLayeredWindowAttributes( + HWND hwnd, // @pyparm int|hwnd||handle to the layered window + COLORREF crKey, // @pyparm int|colorKey||specifies the color key + int bAlpha, // @pyparm int|alpha||value for the blend function + DWORD dwFlags // @pyparm int|flags||action + ); + + %endif // End of winxpgui only functi0ons + // @pyswig int|GetWindowLong| // @pyparm int|hwnd|| |
From: Mark H. <mha...@us...> - 2004-10-08 23:37:37
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9957 Added Files: scp.py Log Message: A demo of service connection points. --- NEW FILE: scp.py --- # re-implementation of the MS "Scp" sample functions # Adds and removes an ActiveDirectory "Service Connection Point", # including managing the security on the object. # This is likely to become a 'module' rather than a demo, once # we had reasonable Python signatures for the functions # (ie, once we have one, real, service that uses it :) from win32com.adsi.adsicon import * from win32com.adsi import adsi import win32api, win32con from win32com.client import Dispatch # Returns distinguished name of SCP. def ScpCreate( service_binding_info, service_class_name, # Service class string to store in SCP. account_name = None, # Logon account that needs access to SCP. container_name = None, keywords = None, object_class = "serviceConnectionPoint", dns_name_type = "A", dn = None, ): container_name = container_name or service_class_name # Get the DNS name of the local computer dns_name = win32api.GetComputerNameEx(win32con.ComputerNameDnsFullyQualified) # Get the distinguished name of the computer object for the local computer if dn is None: dn = win32api.GetComputerObjectName(win32con.NameFullyQualifiedDN) # Compose the ADSpath and bind to the computer object for the local computer comp = adsi.ADsGetObject("LDAP://" + dn, adsi.IID_IDirectoryObject) # Publish the SCP as a child of the computer object keywords = keywords or [] # Fill in the attribute values to be stored in the SCP. attrs = [ ("cn", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (container_name,)), ("objectClass", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (object_class,)), ("keywords", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, keywords), ("serviceDnsName", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (dns_name,)), ("serviceDnsNameType", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (dns_name_type,)), ("serviceClassName", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (service_class_name,)), ("serviceBindingInformation", ADS_ATTR_UPDATE, ADSTYPE_CASE_IGNORE_STRING, (service_binding_info,)), ] new = comp.CreateDSObject("cn=" + container_name, attrs) print "got new", new # Wrap in a usable IDispatch object. new = Dispatch(new) AllowAccessToScpProperties(account_name, new) def ScpDelete(service_class_name, container_name = None, dn = None): container_name = container_name or service_class_name if dn is None: dn = win32api.GetComputerObjectName(win32con.NameFullyQualifiedDN) print "DN is", dn # Compose the ADSpath and bind to the computer object for the local computer comp = adsi.ADsGetObject("LDAP://" + dn, adsi.IID_IDirectoryObject) comp.DeleteDSObject("cn=" + container_name) print "Deleted!" def AllowAccessToScpProperties( accountSAM, #Service account to allow access. scpObject): # The IADs SCP object. attribute = "nTSecurityDescriptor"; # If no service account is specified, service runs under LocalSystem. # So allow access to the computer account of the service's host. if accountSAM: trustee = accountSAM else: # Get the SAM account name of the computer object for the server. trustee = win32api.GetComputerObjectName(win32con.NameSamCompatible) # Get the nTSecurityDescriptor sd = getattr(scpObject, attribute) acl = sd.DiscretionaryAcl ace1 = Dispatch(adsi.CLSID_AccessControlEntry) ace2 = Dispatch(adsi.CLSID_AccessControlEntry) # Set the properties of the two ACEs. # Allow read and write access to the property. ace1.AccessMask = ADS_RIGHT_DS_READ_PROP | ADS_RIGHT_DS_WRITE_PROP ace2.AccessMask = ADS_RIGHT_DS_READ_PROP | ADS_RIGHT_DS_WRITE_PROP # Set the trustee, which is either the service account or the # host computer account. ace1.Trustee = trustee ace2.Trustee = trustee # Set the ACE type. ace1.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT ace2.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT # Set AceFlags to zero because ACE is not inheritable. ace1.AceFlags = 0 ace2.AceFlags = 0 # Set Flags to indicate an ACE that protects a specified object. ace1.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT ace2.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT # Set ObjectType to the schemaIDGUID of the attribute. ace1.ObjectType = "{28630eb8-41d5-11d1-a9c1-0000f80367c1}" # serviceDNSName ace2.ObjectType = "{b7b1311c-b82e-11d0-afee-0000f80367c1}" # serviceBindingInformation # Add the ACEs to the DACL. acl.AddAce(ace1) # Do it again for the second ACE. acl.AddAce(ace2) # Write the modified DACL back to the security descriptor. sd.DiscretionaryAcl = acl # Write the ntSecurityDescriptor property to the property cache. setattr(scpObject, attribute, sd) # SetInfo updates the SCP object in the directory. scpObject.SetInfo() print "Set security on object for account '%s'" % (trustee,) if __name__=='__main__': ScpDelete("PythonSCPTest") ScpCreate("2222", "PythonSCPTest", None, keywords = "mark was here".split()) |
From: Mark H. <mha...@us...> - 2004-10-08 23:24:14
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/security In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7029 Added Files: query_information.py Log Message: Show how win32api.GetDomainName() works. --- NEW FILE: query_information.py --- from ntsecuritycon import * import win32api, win32security, winerror # This is a Python implementation of win32api.GetDomainName() def GetDomainName(): try: tok = win32security.OpenThreadToken(win32api.GetCurrentThread(), TOKEN_QUERY, 1) except win32api.error, details: if details[0] != winerror.ERROR_NO_TOKEN: raise # attempt to open the process token, since no thread token # exists tok = win32security.OpenProcessToken(win32api.GetCurrentProcess(), TOKEN_QUERY) sid, attr = win32security.GetTokenInformation(tok, TokenUser) win32api.CloseHandle(tok) name, dom, typ = win32security.LookupAccountSid(None, sid) return dom if __name__=='__main__': print "Domain name is", GetDomainName() |
From: Mark H. <mha...@us...> - 2004-10-08 23:16:39
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5564 Modified Files: test_win32file.py Log Message: Add EncryptFile/DecryptFile tests Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_win32file.py 12 Jun 2004 13:26:02 -0000 1.3 --- test_win32file.py 8 Oct 2004 23:16:27 -0000 1.4 *************** *** 1,4 **** import unittest ! import win32api, win32file, win32con, pywintypes import sys import os --- 1,4 ---- import unittest ! import win32api, win32file, win32con, pywintypes, winerror import sys import os *************** *** 151,154 **** --- 151,174 ---- shutil.rmtree(test_path) + class TestEncrypt(unittest.TestCase): + def testEncrypt(self): + fname = tempfile.mktemp("win32file_test") + f = open(fname, "wb") + f.write("hello") + f.close() + f = None + try: + try: + win32file.EncryptFile(fname) + except win32file.error, details: + if details[0] != winerror.ERROR_ACCESS_DENIED: + raise + print "It appears this is not NTFS - cant encrypt/decrypt" + win32file.DecryptFile(fname) + finally: + if f is not None: + f.close() + os.unlink(fname) + if __name__ == '__main__': unittest.main() |
From: Mark H. <mha...@us...> - 2004-10-08 23:16:16
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5396 Modified Files: pywin32_postinstall.py Log Message: We would fail to setup the Help in the registry if this was the first time a non-admin user installed a python extesion after an admin installed python itself. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pywin32_postinstall.py 6 Oct 2004 05:38:29 -0000 1.14 --- pywin32_postinstall.py 8 Oct 2004 23:15:56 -0000 1.15 *************** *** 201,204 **** --- 201,205 ---- "reinstall this software as an Administrator" \ % dst + print msg raise RuntimeError, msg continue *************** *** 226,229 **** --- 227,234 ---- traceback.print_exc() + # There may be no main Python key in HKCU if, eg, an admin installed + # python itself. + _winreg.CreateKey(get_root_hkey(), root_key_name) + # Register the .chm help file. chm_file = os.path.join(lib_dir, "PyWin32.chm") |
From: Mark H. <mha...@us...> - 2004-10-08 21:57:00
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18698 Modified Files: win32gui.i Log Message: Fix win32gui on NT, via [ 993793 ] win32gui linked to missing FlashWindowEx Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** win32gui.i 24 Sep 2004 06:39:15 -0000 1.50 --- win32gui.i 8 Oct 2004 21:56:48 -0000 1.51 *************** *** 1124,1129 **** if (!PyArg_ParseTuple(args, "iiii", &f.hwnd, &f.dwFlags, &f.uCount, &f.dwTimeout)) return NULL; Py_BEGIN_ALLOW_THREADS ! rc = FlashWindowEx(&f); Py_END_ALLOW_THREADS ret = rc ? Py_True : Py_False; --- 1124,1137 ---- if (!PyArg_ParseTuple(args, "iiii", &f.hwnd, &f.dwFlags, &f.uCount, &f.dwTimeout)) return NULL; + // not on NT + HMODULE hmod = GetModuleHandle("user32"); + BOOL (WINAPI *pfnFW)(PFLASHWINFO) = NULL; + if (hmod) + pfnFW = (BOOL (WINAPI *)(PFLASHWINFO))GetProcAddress(hmod, "FlashWindowEx"); + if (pfnFW==NULL) + return PyErr_Format(PyExc_NotImplementedError, + "FlashWindowsEx is not supported on this version of windows"); Py_BEGIN_ALLOW_THREADS ! rc = (*pfnFW)(&f); Py_END_ALLOW_THREADS ret = rc ? Py_True : Py_False; |
From: Mark H. <mha...@us...> - 2004-10-08 21:51:34
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17948 Modified Files: setup_win32all.py Log Message: isapi only builds on Python 2.3+ Index: setup_win32all.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup_win32all.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** setup_win32all.py 6 Oct 2004 05:12:53 -0000 1.35 --- setup_win32all.py 8 Oct 2004 21:51:25 -0000 1.36 *************** *** 925,930 **** ] ! other_extensions = [ ! WinExt_ISAPI('PyISAPI_loader', sources=[os.path.join("isapi", "src", s) for s in """PyExtensionObjects.cpp PyFilterObjects.cpp --- 925,933 ---- ] ! other_extensions = [] ! if sys.hexversion >= 0x2030000: ! # GILState stuff too hard pre 2.3! ! other_extensions.append( ! WinExt_ISAPI('PyISAPI_loader', sources=[os.path.join("isapi", "src", s) for s in """PyExtensionObjects.cpp PyFilterObjects.cpp *************** *** 938,943 **** HttpFilterProc TerminateFilter PyISAPISetOptions""".split(), ! ), ! ] W32_exe_files = [ --- 941,946 ---- HttpFilterProc TerminateFilter PyISAPISetOptions""".split(), ! ) ! ) W32_exe_files = [ *************** *** 1094,1098 **** dist = setup(name="pywin32", ! version=build_number, description="Python for Window Extensions", long_description="Python extensions for Microsoft Windows\n" --- 1097,1101 ---- dist = setup(name="pywin32", ! version=str(build_number), description="Python for Window Extensions", long_description="Python extensions for Microsoft Windows\n" |
From: Mark H. <mha...@us...> - 2004-10-07 08:55:32
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20833 Modified Files: control.py formatter.py Log Message: [ 996488 ] characterset support for pythonwin editor Index: control.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/control.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** control.py 15 Apr 2002 15:31:59 -0000 1.12 --- control.py 7 Oct 2004 08:54:01 -0000 1.13 *************** *** 106,113 **** def SCIStyleSetEOLFilled(self, num, v): return self.SendScintilla(SCI_STYLESETEOLFILLED, num, v) ! def SCIStyleSetFont(self, num, name): buff = array.array('c', name + "\0") addressBuffer = buff.buffer_info()[0] self.SendScintilla(SCI_STYLESETFONT, num, addressBuffer) def SCIStyleSetBold(self, num, bBold): self.SendScintilla(SCI_STYLESETBOLD, num, bBold) --- 106,114 ---- def SCIStyleSetEOLFilled(self, num, v): return self.SendScintilla(SCI_STYLESETEOLFILLED, num, v) ! def SCIStyleSetFont(self, num, name, characterset=0): buff = array.array('c', name + "\0") addressBuffer = buff.buffer_info()[0] self.SendScintilla(SCI_STYLESETFONT, num, addressBuffer) + self.SendScintilla(SCI_STYLESETCHARACTERSET, num, characterset) def SCIStyleSetBold(self, num, bBold): self.SendScintilla(SCI_STYLESETBOLD, num, bBold) Index: formatter.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/formatter.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** formatter.py 5 Jul 2001 07:52:32 -0000 1.10 --- formatter.py 7 Oct 2004 08:54:01 -0000 1.11 *************** *** 131,135 **** else: baseFormat = f scintilla.SCIStyleSetFore(stylenum, f[4]) ! scintilla.SCIStyleSetFont( stylenum, baseFormat[7]) if f[1] & 1: scintilla.SCIStyleSetBold(stylenum, 1) else: scintilla.SCIStyleSetBold(stylenum, 0) --- 131,135 ---- else: baseFormat = f scintilla.SCIStyleSetFore(stylenum, f[4]) ! scintilla.SCIStyleSetFont(stylenum, baseFormat[7], baseFormat[5]) if f[1] & 1: scintilla.SCIStyleSetBold(stylenum, 1) else: scintilla.SCIStyleSetBold(stylenum, 0) |
From: Mark H. <mha...@us...> - 2004-10-07 08:52:49
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20298 Modified Files: browser.py Log Message: [ 992182 ] pywin.tools.browser and objects without __class__ Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** browser.py 9 Apr 2004 11:33:50 -0000 1.6 --- browser.py 7 Oct 2004 08:51:36 -0000 1.7 *************** *** 277,281 **** cls = TypeMap[type(ob)] except KeyError: ! if isinstance(ob, object): # 'new style' class cls = HLIInstance else: --- 277,281 ---- cls = TypeMap[type(ob)] except KeyError: ! if hasattr(ob, '__class__'): # 'new style' class cls = HLIInstance else: |
From: Mark H. <mha...@us...> - 2004-10-07 08:50:05
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784 Modified Files: startup.py Log Message: [ 991683 ] fix for pythonwin /app appmod ... Index: startup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/startup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** startup.py 26 Oct 1999 07:45:06 -0000 1.2 --- startup.py 7 Oct 2004 08:49:04 -0000 1.3 *************** *** 42,46 **** import cmdline moduleName = cmdline.FixArgFileName(sys.argv[1]) ! sys.appargvoffset = 1 newargv=sys.argv[sys.appargvoffset:] # newargv.insert(0, sys.argv[0]) --- 42,46 ---- import cmdline moduleName = cmdline.FixArgFileName(sys.argv[1]) ! sys.appargvoffset = 2 newargv=sys.argv[sys.appargvoffset:] # newargv.insert(0, sys.argv[0]) |
From: Mark H. <mha...@us...> - 2004-10-07 08:46:26
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18996 Modified Files: win32thread.cpp win32ui.h win32uimodule.cpp win32virt.cpp Log Message: [ 977399 ] Support for user supplied exception handler Index: win32ui.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32ui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32ui.h 6 Dec 1999 01:13:50 -0000 1.2 --- win32ui.h 7 Oct 2004 08:45:24 -0000 1.3 *************** *** 239,242 **** --- 239,252 ---- }; + enum EnumExceptionHandlerAction { + EHA_PRINT_ERROR, + EHA_DISPLAY_DIALOG + }; + + typedef void (*ExceptionHandlerFunc)(int action, const char *context, const char *extraTitleMsg); + + PYW_EXPORT void ExceptionHandler(int action, const char *context=NULL, const char *extraTitleMsg=NULL); + PYW_EXPORT ExceptionHandlerFunc SetExceptionHandler(ExceptionHandlerFunc handler); + // A helper class for calling "virtual methods" - ie, given a C++ object // call a Python method of that name on the attached Python object. Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** win32uimodule.cpp 8 Sep 2004 23:31:12 -0000 1.28 --- win32uimodule.cpp 7 Oct 2004 08:45:24 -0000 1.29 *************** *** 50,53 **** --- 50,59 ---- static char BASED_CODE errorName[] = "win32ui"; + // We can't init exceptionHandler in initwin32ui because the application using + // us could have called SetExceptionHandler earlier. We do a forward declaration + // of DefaultExceptionHandler here and assign it to exceptionHandler. + void DefaultExceptionHandler(int action, const char *context, const char *extraTitleMsg); + static ExceptionHandlerFunc exceptionHandler = DefaultExceptionHandler; + PYW_EXPORT PyObject *ui_module_error; Win32uiHostGlue *pHostGlue = NULL; *************** *** 612,619 **** v = PyRun_String((char *)command, file_input, d, d); if (v == NULL) { ! PyObject *type, *value, *traceback; ! PyErr_Fetch(&type, &value, &traceback); ! DisplayPythonTraceback(type, value, traceback); ! PyErr_Restore(type, value, traceback); /******* PyObject *fo = PyFile_FromString((char *)logFileName, "w" ); --- 618,622 ---- v = PyRun_String((char *)command, file_input, d, d); if (v == NULL) { ! ExceptionHandler(EHA_DISPLAY_DIALOG); /******* PyObject *fo = PyFile_FromString((char *)logFileName, "w" ); *************** *** 701,726 **** // basic recursion control. static BOOL bInError = FALSE; ! if (bInError) return; bInError=TRUE; ! // Check if the exception is SystemExit - if so, ! // PyErr_Print will terminate then and there! This is ! // not good (and not what we want!? ! PyObject *exception, *v, *tb; ! PyErr_Fetch(&exception, &v, &tb); ! PyErr_NormalizeException(&exception, &v, &tb); ! if (exception && PyErr_GivenExceptionMatches(exception, PyExc_SystemExit)) { ! // Replace it with a RuntimeError. ! TRACE("WARNING!! win32ui had a SystemError - Replacing with RuntimeError!!\n"); ! Py_DECREF(exception); ! Py_XINCREF(PyExc_RuntimeError); ! PyErr_Restore(PyExc_RuntimeError, v, tb); ! } else ! PyErr_Restore(exception, v, tb); ! // Now print it. ! PyErr_Print(); ! bInError=FALSE; } --- 704,765 ---- // basic recursion control. static BOOL bInError = FALSE; ! if (bInError) { ! TRACE("gui_print_error: recursive call!\n"); ! return; ! } bInError=TRUE; + ExceptionHandler(EHA_PRINT_ERROR); + bInError=FALSE; + } ! void DefaultExceptionHandler(int action, const char *context, const char *extraTitleMsg) ! { ! PyObject *type, *value, *traceback; ! PyErr_Fetch(&type, &value, &traceback); ! if (!type) { ! TRACE("DefaultExceptionHandler: no exception occured!\n"); ! return; ! } ! if (action == EHA_PRINT_ERROR) ! { ! // Check if the exception is SystemExit - if so, ! // PyErr_Print will terminate then and there! This is ! // not good (and not what we want!? ! PyErr_NormalizeException(&type, &value, &traceback); ! if (type && PyErr_GivenExceptionMatches(type, PyExc_SystemExit)) { ! // Replace it with a RuntimeError. ! TRACE("WARNING!! win32ui had a SystemError - Replacing with RuntimeError!!\n"); ! Py_DECREF(type); ! Py_XINCREF(PyExc_RuntimeError); ! PyErr_Restore(PyExc_RuntimeError, value, traceback); ! } else ! PyErr_Restore(type, value, traceback); ! fprintf(stderr, "%s\n", context); ! // Now print it. ! PyErr_Print(); ! } ! else if (action == EHA_DISPLAY_DIALOG) ! { ! DisplayPythonTraceback(type, value, traceback, extraTitleMsg); ! PyErr_Restore(type, value, traceback); ! } ! else ! TRACE("DefaultExceptionHandler: unknown action (%d)\n", action); ! } ! void ExceptionHandler(int action, const char *context, const char *extraTitleMsg) ! { ! if (exceptionHandler) ! exceptionHandler(action, extraTitleMsg, context); ! else ! TRACE("ExceptionHandler: no exception handler available\n"); ! } ! ! ExceptionHandlerFunc SetExceptionHandler(ExceptionHandlerFunc handler) ! { ! ExceptionHandlerFunc oldHandler = exceptionHandler; ! exceptionHandler = handler; ! return oldHandler; } Index: win32virt.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32virt.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** win32virt.cpp 1 Sep 1999 23:33:03 -0000 1.1 --- win32virt.cpp 7 Oct 2004 08:45:24 -0000 1.2 *************** *** 16,20 **** // ////////////////////////////////////////////////////////////////////// - extern BOOL DisplayPythonTraceback(PyObject *exc_type, PyObject *exc_val, PyObject *exc_tb, const char *extraTitleMsg = NULL); extern BOOL bInFatalShutdown; --- 16,19 ---- *************** *** 92,97 **** TRACE("CallVirtual : callback failed with exception\n"); gui_print_error(); PyObject *obRepr = PyObject_Repr(handler); ! char *szRepr = PyString_AsString(obRepr); wsprintf(msg, "%s() virtual handler (%s) raised an exception", (const char *)csHandlerName, szRepr); Py_XDECREF(obRepr); --- 91,99 ---- TRACE("CallVirtual : callback failed with exception\n"); gui_print_error(); + // this will probably fail if we are already inside the exception handler PyObject *obRepr = PyObject_Repr(handler); ! char *szRepr = "<no representation (PyObject_Repr failed)>"; ! if (obRepr) ! szRepr = PyString_AsString(obRepr); wsprintf(msg, "%s() virtual handler (%s) raised an exception", (const char *)csHandlerName, szRepr); Py_XDECREF(obRepr); *************** *** 108,115 **** csAddnMsg += " handler"; ! PyObject *type, *value, *traceback; ! PyErr_Fetch(&type, &value, &traceback); ! DisplayPythonTraceback(type, value, traceback, csAddnMsg); ! PyErr_Restore(type, value, traceback); } return FALSE; --- 110,114 ---- csAddnMsg += " handler"; ! ExceptionHandler(EHA_DISPLAY_DIALOG, NULL, csAddnMsg); } return FALSE; Index: win32thread.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32thread.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32thread.cpp 20 Jan 2004 22:28:58 -0000 1.5 --- win32thread.cpp 7 Oct 2004 08:45:24 -0000 1.6 *************** *** 160,165 **** PyErr_Clear(); else { ! fprintf(stderr, "Unhandled exception in thread:\n"); ! PyErr_Print(); } } --- 160,164 ---- PyErr_Clear(); else { ! ExceptionHandler(EHA_PRINT_ERROR, "Unhandled exception in thread"); } } |
From: Mark H. <mha...@us...> - 2004-10-07 08:42:27
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18152 Modified Files: win32control.cpp Log Message: [ 977395 ] PyCStatusBarCtrl.SetTipText Index: win32control.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32control.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32control.cpp 20 Jan 2004 22:28:55 -0000 1.4 --- win32control.cpp 7 Oct 2004 08:41:17 -0000 1.5 *************** *** 2361,2364 **** --- 2361,2396 ---- } + // @pymethod |PyCStatusBarCtrl|SetTipText|Sets the tooltip text for a pane in a status bar. The status bar must have been created with the afxres.SBT_TOOLTIPS control style to enable ToolTips. + + PyObject * + PyCStatusBarCtrl_set_tip_text(PyObject *self, PyObject *args) + { + int nPane; + char *buf; + + CStatusBarCtrl *pSB = GetStatusBarCtrl(self); + + if (!pSB) + return NULL; + + // @pyparm int|nPane||The zero-based index of status bar pane to receive the tooltip text. + // @pyparm string|text||The string containing the tooltip text. + + // @comm Pay attention, this tooltip text is ONLY displayed in two situations: + // <nl>1. When the corresponding pane in the status bar contains only an icon. + // <nl>2. When the corresponding pane in the status bar contains text that is truncated due to the size of the pane. + // <nl>To make the tooltip appear even if the text is not truncated, you could add additional spaces to the end of the pane text. + + if (!PyArg_ParseTuple(args, + "is:SetTipText", &nPane, &buf)) + return NULL; + + GUI_BGN_SAVE; + pSB->SetTipText (nPane, buf); // @pyseemfc CStatusBarCtrl|SetTipText + GUI_END_SAVE; + + RETURN_NONE; + } + // @object PyCStatusBarCtrl|A windows progress bar control. Encapsulates an MFC <c CStatusBarCtrl> class. Derived from <o PyCControl>. static struct PyMethodDef PyCStatusBarCtrl_methods[] = { *************** *** 2373,2376 **** --- 2405,2409 ---- {"SetParts", PyCStatusBarCtrl_set_parts, 1}, // @pymeth SetParts|Sets the number of parts in a status bar control and the coordinate of the right edge of each part. {"SetText", PyCStatusBarCtrl_set_text, 1}, // @pymeth SetText|Set the text in the given part of a status bar control. + {"SetTipText", PyCStatusBarCtrl_set_tip_text, 1}, // @pymeth SetTipText|Sets the tooltip text for a pane in a status bar. {NULL, NULL} }; |
From: Mark H. <mha...@us...> - 2004-10-07 07:47:21
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6838 Modified Files: win32win.cpp Log Message: [ 977394 ] Integer menu ID for PyCFrameWnd.CreateWindow Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** win32win.cpp 9 Oct 2000 22:31:50 -0000 1.7 --- win32win.cpp 7 Oct 2004 07:45:57 -0000 1.8 *************** *** 3232,3239 **** PyObject *obParent = Py_None; PyObject *obContext = Py_None; ! char *szClass=NULL, *szTitle=NULL,*szMenuName=NULL; DWORD styleEx=0; DWORD style = WS_VISIBLE | WS_OVERLAPPEDWINDOW; ! if(!PyArg_ParseTuple(args, "zs|lOOOzl:Create", &szClass, // @pyparm string|wndClass||The window class name, or None &szTitle, // @pyparm string|title||The window title --- 3232,3240 ---- PyObject *obParent = Py_None; PyObject *obContext = Py_None; ! PyObject *obMenuID = Py_None; ! char *szClass=NULL, *szTitle=NULL; DWORD styleEx=0; DWORD style = WS_VISIBLE | WS_OVERLAPPEDWINDOW; ! if(!PyArg_ParseTuple(args, "zs|lOOOOl:Create", &szClass, // @pyparm string|wndClass||The window class name, or None &szTitle, // @pyparm string|title||The window title *************** *** 3242,3246 **** &obParent, // @pyparm parent|<o PyCWnd>|None|The parent window &obContext,// @pyparm tuple|createContext|None|A tuple representing a CREATECONTEXT structure. ! &szMenuName,// @pyparm string|pszMenuName||The string id for the menu. &styleEx)) // @pyparm int|styleEx||The extended style of the window being created. return NULL; --- 3243,3247 ---- &obParent, // @pyparm parent|<o PyCWnd>|None|The parent window &obContext,// @pyparm tuple|createContext|None|A tuple representing a CREATECONTEXT structure. ! &obMenuID,// @pyparm string or int|menuId||The string or integer id for the menu. &styleEx)) // @pyparm int|styleEx||The extended style of the window being created. return NULL; *************** *** 3267,3270 **** --- 3268,3281 ---- RETURN_TYPE_ERR("The parent window is not a valid PyFrameWnd"); } + char *szMenuName = NULL; + if (obMenuID != Py_None) + { + if (PyInt_Check(obMenuID)) + szMenuName = MAKEINTRESOURCE(PyInt_AsLong(obMenuID)); + else if (PyString_Check(obMenuID)) + szMenuName = PyString_AsString(obMenuID); + else + RETURN_TYPE_ERR("The menu id must be an integer or string"); + } GUI_BGN_SAVE; |
From: Mark H. <mha...@us...> - 2004-10-07 07:44:17
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6251 Modified Files: default.cfg Log Message: Ctrl+F3 "AutoFindNext" feature from Niki Spahie, via [ 996502 ] pythonwin editor AutoFindNext Index: default.cfg =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/default.cfg,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** default.cfg 27 Sep 2002 05:07:50 -0000 1.6 --- default.cfg 7 Oct 2004 07:42:47 -0000 1.7 *************** *** 65,68 **** --- 65,70 ---- Shift+F11 = DbgStepOut + Ctrl+F3 = AutoFindNext + [Keys:Editor] *************** *** 174,177 **** --- 176,204 ---- text.tag_add("sel", start, end) + # From Niki Spahie + def AutoFindNext(editor_window, event): + "find selected text or word under cursor" + + from pywin.scintilla import find + from pywin.scintilla import scintillacon + + try: + sci = editor_window.edit + word = sci.GetSelText() + if word: + find.lastSearch.findText = word + find.lastSearch.sel = sci.GetSel() + else: + pos = sci.SendScintilla( scintillacon.SCI_GETCURRENTPOS ) + start = sci.SendScintilla( scintillacon.SCI_WORDSTARTPOSITION, pos, 1 ) + end = sci.SendScintilla( scintillacon.SCI_WORDENDPOSITION, pos, 1 ) + word = sci.GetTextRange( start, end ) + if word: + find.lastSearch.findText = word + find.lastSearch.sel = (start,end) + except Exception, why: + print repr(why), why + find.FindNext() + # A couple of generic events. |
From: Mark H. <mha...@us...> - 2004-10-07 04:33:08
|
Update of /cvsroot/pywin32/pywin32/isapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7909 Modified Files: ControlBlock.h PyExtensionObjects.cpp Log Message: Correct WriteClient return value handling. Index: ControlBlock.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/ControlBlock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ControlBlock.h 6 Oct 2004 05:11:53 -0000 1.1 --- ControlBlock.h 7 Oct 2004 04:32:49 -0000 1.2 *************** *** 76,79 **** --- 76,83 ---- return dwBufLen; } + BOOL WriteClient(LPCTSTR buffer, DWORD *buffLen, const int reserved = 0) + { + return m_pECB->WriteClient(m_pECB->ConnID, (void *) buffer, buffLen, reserved); + } bool ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize) Index: PyExtensionObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyExtensionObjects.cpp 6 Oct 2004 05:11:53 -0000 1.1 --- PyExtensionObjects.cpp 7 Oct 2004 04:32:49 -0000 1.2 *************** *** 295,304 **** ! // @pymethod |EXTENSION_CONTROL_BLOCK|WriteClient| PyObject * PyECB::WriteClient(PyObject *self, PyObject *args) { BOOL bRes = FALSE; TCHAR * buffer = NULL; ! int buffLen = 0; int reserved = 0; --- 295,304 ---- ! // @pymethod int|EXTENSION_CONTROL_BLOCK|WriteClient| PyObject * PyECB::WriteClient(PyObject *self, PyObject *args) { BOOL bRes = FALSE; TCHAR * buffer = NULL; ! DWORD buffLen = 0; int reserved = 0; *************** *** 309,322 **** return NULL; if (pecb->m_pcb){ Py_BEGIN_ALLOW_THREADS ! bRes = pecb->m_pcb->WriteStream(buffer, buffLen, reserved); Py_END_ALLOW_THREADS if (!bRes) return SetPyECBError("WriteClient"); } ! ! Py_INCREF(Py_None); ! return Py_None; } --- 309,322 ---- return NULL; + DWORD bytesWritten = 0; if (pecb->m_pcb){ Py_BEGIN_ALLOW_THREADS ! bRes = pecb->m_pcb->WriteClient(buffer, &buffLen, reserved); Py_END_ALLOW_THREADS if (!bRes) return SetPyECBError("WriteClient"); } ! return PyInt_FromLong(buffLen); ! // @rdesc the result is the number of bytes written. } |
From: Mark H. <mha...@us...> - 2004-10-07 03:42:00
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31999 Modified Files: dbi.cpp Log Message: Fix reference count bug in str() of a dbi object. Via [ 1017653 ] crash fix for dbi.dll Index: dbi.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/dbi.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dbi.cpp 13 Sep 2004 03:02:31 -0000 1.7 --- dbi.cpp 7 Oct 2004 03:41:49 -0000 1.8 *************** *** 82,85 **** --- 82,92 ---- } + static PyObject *dbiRawStr(PyObject *self) + { + PyObject *val = dbiValue(self); + Py_INCREF(val); + return val; + } + static PyObject *dateStr(PyObject *o) { *************** *** 203,207 **** 0, /*tp_hash */ 0, /*tp_call */ ! dbiValue /*tp_str */ }; --- 210,214 ---- 0, /*tp_hash */ 0, /*tp_call */ ! dbiRawStr /*tp_str */ }; |
From: Mark H. <mha...@us...> - 2004-10-06 06:10:43
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26965 Modified Files: pywin32-document.xml pywin32.mak Log Message: Update autoduck for pyisapi->isapi Index: pywin32-document.xml =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32-document.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pywin32-document.xml 11 Sep 2004 07:38:25 -0000 1.3 --- pywin32-document.xml 6 Oct 2004 06:09:12 -0000 1.4 *************** *** 30,34 **** <category id="isapi" label="ISAPI filters and extensions"> <overviews> ! <item name="Introduction to Python ISAPI support" href="pyisapi/doc/isapi.html"/> </overviews> </category> --- 30,34 ---- <category id="isapi" label="ISAPI filters and extensions"> <overviews> ! <item name="Introduction to Python ISAPI support" href="isapi/doc/isapi.html"/> </overviews> </category> Index: pywin32.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32.mak,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pywin32.mak 11 Sep 2004 07:43:01 -0000 1.7 --- pywin32.mak 6 Oct 2004 06:09:12 -0000 1.8 *************** *** 18,22 **** PYTHONWIN_DIR = ../pythonwin ! ISAPI_DIR = ../pyisapi ISAPI_SOURCE_DIR = $(ISAPI_DIR)/src --- 18,22 ---- PYTHONWIN_DIR = ../pythonwin ! ISAPI_DIR = ../isapi ISAPI_SOURCE_DIR = $(ISAPI_DIR)/src |
From: Mark H. <mha...@us...> - 2004-10-06 05:38:53
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21769 Modified Files: pywin32_postinstall.py Log Message: Try and avoid having copies of the system32 dlls in both sys.prefix and %system32%. If we do install into System32, nuke any versions of the same file in sys.prefix. If we fail to install into system32 but the file already exists there, we refuse to install in sys.prefix. Index: pywin32_postinstall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/pywin32_postinstall.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pywin32_postinstall.py 6 Oct 2004 05:16:08 -0000 1.13 --- pywin32_postinstall.py 6 Oct 2004 05:38:29 -0000 1.14 *************** *** 181,189 **** file_created(dst) worked = 1 if worked: break except win32api.error, details: if details[0]==5: ! # access denied - user not admin - try sys.prefix dir. continue raise --- 181,205 ---- file_created(dst) worked = 1 + # If this isn't sys.prefix (ie, System32), then nuke + # any versions that may exist in sys.prefix - having + # duplicates causes major headaches. + if dest_dir != sys.prefix: + bad_fname = os.path.join(sys.prefix, base) + if os.path.exists(bad_fname): + # let exceptions go here - delete must succeed + os.unlink(bad_fname) if worked: break except win32api.error, details: if details[0]==5: ! # access denied - user not admin - try sys.prefix dir, ! # but first check that a version doesn't already exist ! # in that place - otherwise that one will still get used! ! if os.path.exists(dst): ! msg = "The file '%s' exists, but can not be replaced " \ ! "due to insufficient permissions. You must " \ ! "reinstall this software as an Administrator" \ ! % dst ! raise RuntimeError, msg continue raise |
From: Mark H. <mha...@us...> - 2004-10-06 05:21:48
|
Update of /cvsroot/pywin32/pywin32/dotnet/compiler/suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18710/dotnet/compiler/suite Removed Files: com_imports.py pystone.py test_builtins.py test_cor_conversions.py test_exceptions.py test_func.py test_methods.py test_misc.py test_signatures.py Log Message: Given IronPython etc, I think we can consider this compiler dead (and can get at it from the attic if necessary) --- com_imports.py DELETED --- --- test_methods.py DELETED --- --- pystone.py DELETED --- --- test_func.py DELETED --- --- test_builtins.py DELETED --- --- test_signatures.py DELETED --- --- test_cor_conversions.py DELETED --- --- test_exceptions.py DELETED --- --- test_misc.py DELETED --- |
From: Mark H. <mha...@us...> - 2004-10-06 05:21:48
|
Update of /cvsroot/pywin32/pywin32/dotnet/compiler/corglue In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18710/dotnet/compiler/corglue Removed Files: corglue.cs makefile Log Message: Given IronPython etc, I think we can consider this compiler dead (and can get at it from the attic if necessary) --- makefile DELETED --- --- corglue.cs DELETED --- |
From: Mark H. <mha...@us...> - 2004-10-06 05:21:48
|
Update of /cvsroot/pywin32/pywin32/dotnet/compiler/samples/crosslang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18710/dotnet/compiler/samples/crosslang Removed Files: .cvsignore MakeTable.py PowerGenerator.py README.txt Table.htm makefile Log Message: Given IronPython etc, I think we can consider this compiler dead (and can get at it from the attic if necessary) --- .cvsignore DELETED --- --- MakeTable.py DELETED --- --- Table.htm DELETED --- --- PowerGenerator.py DELETED --- --- makefile DELETED --- --- README.txt DELETED --- |
From: Mark H. <mha...@us...> - 2004-10-06 05:21:46
|
Update of /cvsroot/pywin32/pywin32/dotnet/compiler/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18710/dotnet/compiler/modules Removed Files: time.py Log Message: Given IronPython etc, I think we can consider this compiler dead (and can get at it from the attic if necessary) --- time.py DELETED --- |