pywin32-checkins Mailing List for Python for Windows Extensions (Page 36)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2008-12-11 07:06:58
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1813/Pythonwin/pywin/Demos Modified Files: Tag: py3k progressbar.py threadedgui.py Log Message: merge various changes from the trunk Index: threadedgui.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/threadedgui.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** threadedgui.py 29 Aug 2008 06:16:06 -0000 1.3.4.1 --- threadedgui.py 11 Dec 2008 07:06:51 -0000 1.3.4.2 *************** *** 9,12 **** --- 9,13 ---- from pywin.mfc import window, docview, thread + from pywin.mfc.thread import WinThread *************** *** 104,112 **** ! class TestThread(thread.WinThread): def __init__(self, parentWindow): self.parentWindow = parentWindow self.child = None ! thread.WinThread.__init__(self) def InitInstance(self): rect = self.parentWindow.GetClientRect() --- 105,113 ---- ! class TestThread(WinThread): def __init__(self, parentWindow): self.parentWindow = parentWindow self.child = None ! WinThread.__init__(self) def InitInstance(self): rect = self.parentWindow.GetClientRect() *************** *** 116,120 **** self.child.Create("FontDemo", win32con.WS_CHILD | win32con.WS_VISIBLE, rect, self.parentWindow) self.SetMainFrame(self.child) ! return thread.WinThread.InitInstance(self) def ExitInstance(self): --- 117,121 ---- self.child.Create("FontDemo", win32con.WS_CHILD | win32con.WS_VISIBLE, rect, self.parentWindow) self.SetMainFrame(self.child) ! return WinThread.InitInstance(self) def ExitInstance(self): Index: progressbar.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/progressbar.py,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** progressbar.py 1 Sep 1999 23:33:35 -0000 1.1 --- progressbar.py 11 Dec 2008 07:06:51 -0000 1.1.4.1 *************** *** 87,91 **** if __name__=='__main__': demo(1) - - # $Header$ - --- 87,88 ---- |
From: Mark H. <mha...@us...> - 2008-12-11 07:06:57
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1813/win32/Demos Modified Files: Tag: py3k eventLogDemo.py win32fileDemo.py Log Message: merge various changes from the trunk Index: win32fileDemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32fileDemo.py,v retrieving revision 1.6.4.3 retrieving revision 1.6.4.4 diff -C2 -d -r1.6.4.3 -r1.6.4.4 *** win32fileDemo.py 27 Sep 2008 18:18:15 -0000 1.6.4.3 --- win32fileDemo.py 11 Dec 2008 07:06:51 -0000 1.6.4.4 *************** *** 22,26 **** None) test_data = "Hello\0there" ! win32file.WriteFile(handle, test_data.encode('mbcs')) handle.Close() # Open it for reading. --- 22,26 ---- None) test_data = "Hello\0there" ! win32file.WriteFile(handle, test_data.encode('ascii')) handle.Close() # Open it for reading. *************** *** 28,32 **** rc, data = win32file.ReadFile(handle, 1024) handle.Close() ! if data.decode('mbcs') == test_data: print("Successfully wrote and read a file") os.unlink(testName) --- 28,32 ---- rc, data = win32file.ReadFile(handle, 1024) handle.Close() ! if data.decode('ascii') == test_data: print("Successfully wrote and read a file") os.unlink(testName) Index: eventLogDemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/eventLogDemo.py,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** eventLogDemo.py 1 Oct 2008 03:59:13 -0000 1.5.4.2 --- eventLogDemo.py 11 Dec 2008 07:06:51 -0000 1.5.4.3 *************** *** 1,4 **** ! import win32evtlog, traceback ! import win32api, win32con import win32security # To translate NT Sids to account names. --- 1,5 ---- ! import win32evtlog ! import win32api ! import win32con import win32security # To translate NT Sids to account names. |
From: Mark H. <mha...@us...> - 2008-12-11 07:02:55
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1460/win32/test Modified Files: Tag: py3k test_odbc.py Log Message: tweaks so we are identical to 2to3's output Index: test_odbc.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_odbc.py,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -C2 -d -r1.7.2.2 -r1.7.2.3 *** test_odbc.py 20 Oct 2008 03:31:32 -0000 1.7.2.2 --- test_odbc.py 11 Dec 2008 07:02:51 -0000 1.7.2.3 *************** *** 43,47 **** conn_str = "Driver={Microsoft Access Driver (*.mdb)};dbq=%s;Uid=;Pwd=;" \ % (self.db_filename,) ! ## print ('Connection string:', conn_str) self.conn = odbc.odbc(conn_str) # And we expect a 'users' table for these tests. --- 43,47 ---- conn_str = "Driver={Microsoft Access Driver (*.mdb)};dbq=%s;Uid=;Pwd=;" \ % (self.db_filename,) ! ## print 'Connection string:', conn_str self.conn = odbc.odbc(conn_str) # And we expect a 'users' table for these tests. *************** *** 74,78 **** self.cur.execute("""drop table %s""" %self.tablename) except (odbc.error, odbc.progError) as why: ! print ("Failed to delete test table %s" %self.tablename, why) self.cur.close() --- 74,78 ---- self.cur.execute("""drop table %s""" %self.tablename) except (odbc.error, odbc.progError) as why: ! print("Failed to delete test table %s" %self.tablename, why) self.cur.close() |
From: Mark H. <mha...@us...> - 2008-12-11 07:01:17
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1249/win32/test Modified Files: testall.py Log Message: fix subprocess usage Index: testall.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/testall.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testall.py 6 Dec 2008 00:46:46 -0000 1.9 --- testall.py 11 Dec 2008 07:01:12 -0000 1.10 *************** *** 26,35 **** self.argv = argv def __call__(self): ! # subprocess failed in strange ways for me?? ! fin, fout, ferr = os.popen3(" ".join(self.argv)) ! fin.close() ! output = fout.read() + ferr.read() ! fout.close() ! rc = ferr.close() if rc: base = os.path.basename(self.argv[1]) --- 26,43 ---- self.argv = argv def __call__(self): ! try: ! import subprocess ! p = subprocess.Popen(self.argv, ! stdout=subprocess.PIPE, ! stderr=subprocess.STDOUT) ! output, _ = p.communicate() ! rc = p.returncode ! except ImportError: ! # py2.3? ! fin, fout, ferr = os.popen3(" ".join(self.argv)) ! fin.close() ! output = fout.read() + ferr.read() ! fout.close() ! rc = ferr.close() if rc: base = os.path.basename(self.argv[1]) |
From: Mark H. <mha...@us...> - 2008-12-11 07:01:00
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1215/win32/test Modified Files: test_win32inet.py Log Message: ftp.python.org no longer exists Index: test_win32inet.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32inet.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_win32inet.py 12 Jun 2004 13:40:34 -0000 1.1 --- test_win32inet.py 11 Dec 2008 07:00:54 -0000 1.2 *************** *** 40,44 **** def testFtpCommand(self): ! hcon = InternetConnect(self.hi, "ftp.python.org", INTERNET_INVALID_PORT_NUMBER, None, None, # username/password INTERNET_SERVICE_FTP, 0, 0) --- 40,46 ---- def testFtpCommand(self): ! # ftp.python.org doesn't exist. ftp.gnu.org is what Python's urllib ! # test code uses. ! hcon = InternetConnect(self.hi, "ftp.gnu.org", INTERNET_INVALID_PORT_NUMBER, None, None, # username/password INTERNET_SERVICE_FTP, 0, 0) |
From: Mark H. <mha...@us...> - 2008-12-11 07:00:45
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1194/win32/test Modified Files: test_win32file.py Log Message: minor reformatting from py3k branch Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** test_win32file.py 11 Dec 2008 05:11:57 -0000 1.19 --- test_win32file.py 11 Dec 2008 07:00:33 -0000 1.20 *************** *** 62,71 **** win32file.SetFilePointer(h, newSize, win32file.FILE_BEGIN) win32file.SetEndOfFile(h) ! self.failUnless(win32file.GetFileSize(h) == newSize, "Truncated file does not have the expected size!") # GetFileAttributesEx/GetFileAttributesExW tests. ! self.failUnless(win32file.GetFileAttributesEx(testName) == win32file.GetFileAttributesExW(testName), ! "ERROR: Expected GetFileAttributesEx and GetFileAttributesExW to return the same data") ! attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName) self.failUnless(size==newSize, --- 62,71 ---- win32file.SetFilePointer(h, newSize, win32file.FILE_BEGIN) win32file.SetEndOfFile(h) ! self.failUnless(win32file.GetFileSize(h) == newSize, ! "Truncated file does not have the expected size! (%s)" %newSize) # GetFileAttributesEx/GetFileAttributesExW tests. ! self.failUnlessEqual(win32file.GetFileAttributesEx(testName), win32file.GetFileAttributesExW(testName)) ! attr, ct, at, wt, size = win32file.GetFileAttributesEx(testName) self.failUnless(size==newSize, |
From: Mark H. <mha...@us...> - 2008-12-11 07:00:18
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1160/win32/test Modified Files: handles.py Log Message: py3k friendly; use sys.maxsize or sys.maxint Index: handles.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/handles.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** handles.py 30 Oct 2007 09:53:32 -0000 1.4 --- handles.py 11 Dec 2008 07:00:12 -0000 1.5 *************** *** 88,92 **** # >>> struct.unpack("P", struct.pack("P", -1)) # (4294967295L,) ! pywintypes.HANDLE(sys.maxint+1) def testGC(self): --- 88,96 ---- # >>> struct.unpack("P", struct.pack("P", -1)) # (4294967295L,) ! try: ! big = sys.maxsize ! except AttributeError: ! big = sys.maxint ! pywintypes.HANDLE(big+1) def testGC(self): |
From: Mark H. <mha...@us...> - 2008-12-11 06:59:39
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1070/win32/Lib Modified Files: win32verstamp.py Log Message: Move to iterators Index: win32verstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32verstamp.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32verstamp.py 6 Dec 2008 00:42:39 -0000 1.4 --- win32verstamp.py 11 Dec 2008 06:59:33 -0000 1.5 *************** *** 72,76 **** result = struct.pack('hh', 0, 1) # wValueLength, wType result = result + key ! for k, v in data.items(): result = result + String(k, v) result = pad32(result) --- 72,76 ---- result = struct.pack('hh', 0, 1) # wValueLength, wType result = result + key ! for k, v in data.iteritems(): result = result + String(k, v) result = pad32(result) *************** *** 94,98 **** result = result + nullterm('VarFileInfo') result = pad32(result) ! for k, v in data.items(): result = result + Var(k, v) return addlen(result) --- 94,98 ---- result = result + nullterm('VarFileInfo') result = pad32(result) ! for k, v in data.iteritems(): result = result + Var(k, v) return addlen(result) |
From: Mark H. <mha...@us...> - 2008-12-11 06:58:27
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1043/win32/Demos Modified Files: win32fileDemo.py Log Message: Use .encode('ascii') to make py3k friendly Index: win32fileDemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32fileDemo.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32fileDemo.py 5 May 2003 01:01:20 -0000 1.6 --- win32fileDemo.py 11 Dec 2008 06:58:21 -0000 1.7 *************** *** 22,26 **** None) test_data = "Hello\0there" ! win32file.WriteFile(handle, test_data) handle.Close() # Open it for reading. --- 22,26 ---- None) test_data = "Hello\0there" ! win32file.WriteFile(handle, test_data.encode('ascii')) handle.Close() # Open it for reading. *************** *** 28,32 **** rc, data = win32file.ReadFile(handle, 1024) handle.Close() ! if data == test_data: print "Successfully wrote and read a file" os.unlink(testName) --- 28,32 ---- rc, data = win32file.ReadFile(handle, 1024) handle.Close() ! if data.decode('ascii') == test_data: print "Successfully wrote and read a file" os.unlink(testName) |
From: Mark H. <mha...@us...> - 2008-12-11 06:57:55
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1019/win32/Demos Modified Files: eventLogDemo.py Log Message: merge from py3k branch - pass user info when logging records Index: eventLogDemo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/eventLogDemo.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** eventLogDemo.py 4 Dec 2008 07:22:19 -0000 1.6 --- eventLogDemo.py 11 Dec 2008 06:57:50 -0000 1.7 *************** *** 1,4 **** --- 1,5 ---- import win32evtlog import win32api + import win32con import win32security # To translate NT Sids to account names. *************** *** 83,90 **** verbose = verbose + 1 if do_write: ! win32evtlogutil.ReportEvent(logType, 2, strings=["The message text for event 2"], data = "Raw\0Data") ! win32evtlogutil.ReportEvent(logType, 1, eventType=win32evtlog.EVENTLOG_WARNING_TYPE, strings=["A warning"], data = "Raw\0Data") ! win32evtlogutil.ReportEvent(logType, 1, eventType=win32evtlog.EVENTLOG_INFORMATION_TYPE, strings=["An info"], data = "Raw\0Data") ! print "Successfully wrote 3 records to the log" if do_read: --- 84,101 ---- verbose = verbose + 1 if do_write: ! ph=win32api.GetCurrentProcess() ! th = win32security.OpenProcessToken(ph,win32con.TOKEN_READ) ! my_sid = win32security.GetTokenInformation(th,win32security.TokenUser)[0] ! ! win32evtlogutil.ReportEvent(logType, 2, ! strings=["The message text for event 2","Another insert"], ! data = "Raw\0Data", sid = my_sid) ! win32evtlogutil.ReportEvent(logType, 1, eventType=win32evtlog.EVENTLOG_WARNING_TYPE, ! strings=["A warning","An even more dire warning"], ! data = "Raw\0Data", sid = my_sid) ! win32evtlogutil.ReportEvent(logType, 1, eventType=win32evtlog.EVENTLOG_INFORMATION_TYPE, ! strings=["An info","Too much info"], ! data = "Raw\0Data", sid = my_sid) ! print("Successfully wrote 3 records to the log") if do_read: |
From: Mark H. <mha...@us...> - 2008-12-11 06:57:22
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv958/win32/Demos Modified Files: desktopmanager.py Log Message: Minor tweaks to imports to make 2to3 friendly Index: desktopmanager.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/desktopmanager.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** desktopmanager.py 20 Jan 2007 22:54:50 -0000 1.2 --- desktopmanager.py 11 Dec 2008 06:57:15 -0000 1.3 *************** *** 3,7 **** import win32api, win32con, win32gui, win32service, win32process import pywintypes ! import traceback, thread, time, cStringIO ## "Shell_TrayWnd" is class of system tray window, broadcasts "TaskbarCreated" when initialized --- 3,8 ---- import win32api, win32con, win32gui, win32service, win32process import pywintypes ! import traceback, thread, time ! import cStringIO ## "Shell_TrayWnd" is class of system tray window, broadcasts "TaskbarCreated" when initialized |
From: Mark H. <mha...@us...> - 2008-12-11 06:56:11
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv901/win32/Demos Modified Files: SystemParametersInfo.py Log Message: On Vista, setting some params seems to be ignored, so don't fail in that case Index: SystemParametersInfo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/SystemParametersInfo.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SystemParametersInfo.py 16 Oct 2005 17:17:10 -0000 1.1 --- SystemParametersInfo.py 11 Dec 2008 06:56:05 -0000 1.2 *************** *** 8,12 **** ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", --- 8,13 ---- ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", ! "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", *************** *** 22,26 **** new_value=win32gui.SystemParametersInfo(cget) print '\tnew value:',new_value ! assert new_value==orig_value+1 win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value --- 23,31 ---- new_value=win32gui.SystemParametersInfo(cget) print '\tnew value:',new_value ! # On Vista, some of these values seem to be ignored. So only "fail" if ! # the new value isn't what we set or the original ! if new_value!=orig_value+1: ! assert new_value == orig_value ! print "Strange - setting %s seems to have been ignored" % (pname,) win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value |
From: Mark H. <mha...@us...> - 2008-12-11 06:55:45
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv865/com/win32comext/mapi Modified Files: mapiutil.py Log Message: py3k friendly changes for the MAPI type map Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mapiutil.py 6 Dec 2008 00:42:06 -0000 1.10 --- mapiutil.py 11 Dec 2008 06:55:34 -0000 1.11 *************** *** 105,110 **** type(0.0): mapitags.PT_DOUBLE, type(0): mapitags.PT_I4, ! type(''): mapitags.PT_STRING8, ! type(u''): mapitags.PT_UNICODE, type(None): mapitags.PT_UNSPECIFIED, # In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)). --- 105,110 ---- type(0.0): mapitags.PT_DOUBLE, type(0): mapitags.PT_I4, ! type(''.encode('ascii')): mapitags.PT_STRING8, # str in py2x, bytes in 3x ! type(u''): mapitags.PT_UNICODE, # unicode in py2x, str in 3x type(None): mapitags.PT_UNSPECIFIED, # In Python 2.2.2, bool isn't a distinct type (type(1==1) is type(0)). |
From: Mark H. <mha...@us...> - 2008-12-11 06:55:04
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv813/com/win32com/client Modified Files: combrowse.py Log Message: Don't convert unicode to string in the COM browser Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** combrowse.py 6 Dec 2008 00:41:13 -0000 1.12 --- combrowse.py 11 Dec 2008 06:54:52 -0000 1.13 *************** *** 50,54 **** if name is None: try: ! name = pythoncom.ProgIDFromCLSID(myobject).encode('mbcs') except pythoncom.com_error: name = str(myobject) --- 50,54 ---- if name is None: try: ! name = pythoncom.ProgIDFromCLSID(myobject) except pythoncom.com_error: name = str(myobject) *************** *** 263,267 **** typeinfo = typelib.GetTypeInfo(index) self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLITypeLibEntry.__init__(self, myitem, name) def GetText(self): --- 263,267 ---- typeinfo = typelib.GetTypeInfo(index) self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLITypeLibEntry.__init__(self, myitem, name) def GetText(self): *************** *** 274,278 **** for j in range(attr[7]): vdesc = typeinfo.GetVarDesc(j) ! name = typeinfo.GetNames(vdesc[0])[0].encode('mbcs') ret.append(browser.MakeHLI(vdesc[1], name)) return ret --- 274,278 ---- for j in range(attr[7]): vdesc = typeinfo.GetVarDesc(j) ! name = typeinfo.GetNames(vdesc[0])[0] ret.append(browser.MakeHLI(vdesc[1], name)) return ret *************** *** 282,286 **** typeinfo, index = myitem self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLICOM.__init__(self, myitem, name) def GetText(self): --- 282,286 ---- typeinfo, index = myitem self.id = typeinfo.GetVarDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLICOM.__init__(self, myitem, name) def GetText(self): *************** *** 372,376 **** typeinfo, index = myitem self.id = typeinfo.GetFuncDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0].encode('mbcs') HLICOM.__init__(self, myitem, name) def GetText(self): --- 372,376 ---- typeinfo, index = myitem self.id = typeinfo.GetFuncDesc(index)[0] ! name = typeinfo.GetNames(self.id)[0] HLICOM.__init__(self, myitem, name) def GetText(self): *************** *** 402,406 **** ret.append(browser.MakeHLI(self.id, "Dispatch ID")) if len(names)>1: ! ret.append(browser.MakeHLI(", ".join(names[1:]).encode('mbcs'), "Named Params")) fd = typeinfo.GetFuncDesc(index) if fd[1]: --- 402,406 ---- ret.append(browser.MakeHLI(self.id, "Dispatch ID")) if len(names)>1: ! ret.append(browser.MakeHLI(", ".join(names[1:]), "Named Params")) fd = typeinfo.GetFuncDesc(index) if fd[1]: |
From: Mark H. <mha...@us...> - 2008-12-11 06:54:26
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv777/Pythonwin/pywin/tools Modified Files: browser.py Log Message: now win32ui is unicode aware, allow the browser to have unicode objects Index: browser.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/browser.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** browser.py 24 Nov 2008 06:07:06 -0000 1.12 --- browser.py 11 Dec 2008 06:54:19 -0000 1.13 *************** *** 24,32 **** self.knownExpandable = None if name: - assert type(name)==str, repr(name) # encode to mbcs if necessary self.name=name else: try: ! self.name=str(myobject.__name__) except (AttributeError, TypeError): try: --- 24,31 ---- self.knownExpandable = None if name: self.name=name else: try: ! self.name=myobject.__name__ except (AttributeError, TypeError): try: |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:35
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/com/win32comext/mapi Modified Files: Tag: py3k emsabtags.py mapiutil.py Log Message: merge more .py changes from the trunk (via 2to3) Index: emsabtags.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/emsabtags.py,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** emsabtags.py 2 Jul 2003 03:40:37 -0000 1.2 --- emsabtags.py 11 Dec 2008 05:45:21 -0000 1.2.4.1 *************** *** 1,4 **** # Converted "manually" from EMSABTAG.H ! from mapitags import PT_UNSPECIFIED, PT_NULL, PT_I2, PT_LONG, PT_R4, \ PT_DOUBLE, PT_CURRENCY, PT_APPTIME, PT_ERROR, \ PT_BOOLEAN, PT_OBJECT, PT_I8, PT_STRING8, PT_UNICODE, \ --- 1,4 ---- # Converted "manually" from EMSABTAG.H ! from .mapitags import PT_UNSPECIFIED, PT_NULL, PT_I2, PT_LONG, PT_R4, \ PT_DOUBLE, PT_CURRENCY, PT_APPTIME, PT_ERROR, \ PT_BOOLEAN, PT_OBJECT, PT_I8, PT_STRING8, PT_UNICODE, \ Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -C2 -d -r1.5.4.3 -r1.5.4.4 *** mapiutil.py 27 Nov 2008 04:58:41 -0000 1.5.4.3 --- mapiutil.py 11 Dec 2008 05:45:21 -0000 1.5.4.4 *************** *** 4,9 **** ListType=list IntType=int ! StringType=str ! from pywintypes import UnicodeType, TimeType import pythoncom import mapi, mapitags --- 4,8 ---- ListType=list IntType=int ! from pywintypes import TimeType import pythoncom import mapi, mapitags *************** *** 29,33 **** # god-damn bullshit hex() warnings: I don't see a way to get the # old behaviour without a warning!! ! ret = hex(long(pt)) # -0x8000000L -> 0x80000000 if ret[0]=='-': ret = ret[1:] --- 28,32 ---- # god-damn bullshit hex() warnings: I don't see a way to get the # old behaviour without a warning!! ! ret = hex(int(pt)) # -0x8000000L -> 0x80000000 if ret[0]=='-': ret = ret[1:] *************** *** 83,87 **** return None if bRetList: ! return map( lambda v: v[1], data ) else: return data[0][1] --- 82,86 ---- return None if bRetList: ! return [v[1] for v in data] else: return data[0][1] *************** *** 143,147 **** # First pass over the properties we should get IDs for. for key, val in propDict.items(): ! if type(key) in [StringType, UnicodeType]: newProps.append((mapi.PS_PUBLIC_STRINGS, key)) # Query for the new IDs --- 142,146 ---- # First pass over the properties we should get IDs for. for key, val in propDict.items(): ! if type(key) in [str, str]: newProps.append((mapi.PS_PUBLIC_STRINGS, key)) # Query for the new IDs *************** *** 150,156 **** newProps = [] for key, val in propDict.items(): ! if type(key) in [StringType, UnicodeType]: type_val=type(val) ! if type_val in [StringType, pywintypes.UnicodeType]: tagType = mapitags.PT_UNICODE elif type_val==IntType: --- 149,155 ---- newProps = [] for key, val in propDict.items(): ! if type(key) in [str, str]: type_val=type(val) ! if type_val in [str, str]: tagType = mapitags.PT_UNICODE elif type_val==IntType: |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:34
|
Update of /cvsroot/pywin32/pywin32/win32/scripts In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/scripts Modified Files: Tag: py3k setup_d.py Log Message: merge more .py changes from the trunk (via 2to3) Index: setup_d.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/setup_d.py,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** setup_d.py 26 Nov 2008 09:03:30 -0000 1.1.4.1 --- setup_d.py 11 Dec 2008 05:45:21 -0000 1.1.4.2 *************** *** 5,9 **** import win32api ! import _winreg import sys import shutil --- 5,9 ---- import win32api ! import winreg import sys import shutil *************** *** 60,73 **** assert os.path.isfile(dll_name), "Shouldn't get here if the file doesn't exist!" try: ! key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name)) ! except _winreg.error: try: ! key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name)) ! except _winreg.error: print("Could not find the existing '%s' module registered in the registry" % (mod_name,)) usage_and_die(4) # Create the debug key. ! sub_key = _winreg.CreateKey(key, "Debug") ! _winreg.SetValue(sub_key, None, _winreg.REG_SZ, dll_name) print("Registered '%s' in the registry" % (dll_name,)) --- 60,73 ---- assert os.path.isfile(dll_name), "Shouldn't get here if the file doesn't exist!" try: ! key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name)) ! except winreg.error: try: ! key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "Software\\Python\\PythonCore\\%s\\Modules\\%s" % (sys.winver, mod_name)) ! except winreg.error: print("Could not find the existing '%s' module registered in the registry" % (mod_name,)) usage_and_die(4) # Create the debug key. ! sub_key = winreg.CreateKey(key, "Debug") ! winreg.SetValue(sub_key, None, winreg.REG_SZ, dll_name) print("Registered '%s' in the registry" % (dll_name,)) |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:30
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/Lib Modified Files: Tag: py3k win32evtlogutil.py win32serviceutil.py win32verstamp.py Log Message: merge more .py changes from the trunk (via 2to3) Index: win32verstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32verstamp.py,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** win32verstamp.py 6 Dec 2008 01:48:26 -0000 1.2.4.2 --- win32verstamp.py 11 Dec 2008 05:45:21 -0000 1.2.4.3 *************** *** 48,52 **** def nullterm(s): # get raw bytes for a NULL terminated unicode string. ! return (s + '\0').encode('unicode-internal') def pad32(s, extra=2): --- 48,52 ---- def nullterm(s): # get raw bytes for a NULL terminated unicode string. ! return (str(s) + '\0').encode('unicode-internal') def pad32(s, extra=2): *************** *** 152,156 **** is_debug = os.path.splitext(pathname)[0].lower().endswith("_d") # convert None to blank strings ! for k, v in sdata.items(): if v is None: sdata[k] = "" --- 152,156 ---- is_debug = os.path.splitext(pathname)[0].lower().endswith("_d") # convert None to blank strings ! for k, v in list(sdata.items()): if v is None: sdata[k] = "" Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.26.2.4 retrieving revision 1.26.2.5 diff -C2 -d -r1.26.2.4 -r1.26.2.5 *** win32serviceutil.py 27 Nov 2008 11:31:10 -0000 1.26.2.4 --- win32serviceutil.py 11 Dec 2008 05:45:21 -0000 1.26.2.5 *************** *** 354,361 **** try: status = win32service.ControlService(hs, win32service.SERVICE_CONTROL_STOP) ! except pywintypes.error as xxx_todo_changeme: ! (hr, name, msg) = xxx_todo_changeme.args ! if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE: ! raise win32service.error(hr, name, msg) for i in range(waitSecs): status = win32service.QueryServiceStatus(hs) --- 354,360 ---- try: status = win32service.ControlService(hs, win32service.SERVICE_CONTROL_STOP) ! except pywintypes.error as exc: ! if exc.winerror!=winerror.ERROR_SERVICE_NOT_ACTIVE: ! raise for i in range(waitSecs): status = win32service.QueryServiceStatus(hs) *************** *** 408,417 **** try: StopService(serviceName, machine) ! except pywintypes.error as xxx_todo_changeme1: ! # Allow only "service not running" error ! (hr, name, msg) = xxx_todo_changeme1.args # Allow only "service not running" error ! if hr!=winerror.ERROR_SERVICE_NOT_ACTIVE: ! raise win32service.error(hr, name, msg) # Give it a few goes, as the service may take time to stop for i in range(waitSeconds): --- 407,414 ---- try: StopService(serviceName, machine) ! except pywintypes.error as exc: # Allow only "service not running" error ! if exc.winerror!=winerror.ERROR_SERVICE_NOT_ACTIVE: ! raise # Give it a few goes, as the service may take time to stop for i in range(waitSeconds): *************** *** 419,425 **** StartService(serviceName, args, machine) break ! except pywintypes.error as xxx_todo_changeme2: ! (hr, name, msg) = xxx_todo_changeme2.args ! if hr!=winerror.ERROR_SERVICE_ALREADY_RUNNING: raise win32api.Sleep(1000) --- 416,421 ---- StartService(serviceName, args, machine) break ! except pywintypes.error as exc: ! if exc.winerror!=winerror.ERROR_SERVICE_ALREADY_RUNNING: raise win32api.Sleep(1000) *************** *** 577,583 **** if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) ! except win32service.error as xxx_todo_changeme3: ! (hr, fn, msg) = xxx_todo_changeme3.args ! print("Error starting service: %s" % msg) elif arg=="restart": --- 573,578 ---- if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) ! except win32service.error as exc: ! print("Error starting service: %s" % exc.strerror) elif arg=="restart": *************** *** 644,653 **** customOptionHandler(*(opts,)) print("Service installed") ! except win32service.error as xxx_todo_changeme4: ! (hr, fn, msg) = xxx_todo_changeme4.args ! if hr==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: ! print("Error installing service: %s (%d)" % (msg, hr)) err = hr except ValueError as msg: # Can be raised by custom option handler. --- 639,647 ---- customOptionHandler(*(opts,)) print("Service installed") ! except win32service.error as exc: ! if exc.winerror==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: ! print("Error installing service: %s (%d)" % (exc.strerror, exc.winerror)) err = hr except ValueError as msg: # Can be raised by custom option handler. *************** *** 688,694 **** customOptionHandler(*(opts,)) print("Service updated") ! except win32service.error as xxx_todo_changeme5: ! (hr, fn, msg) = xxx_todo_changeme5.args ! print("Error changing service configuration: %s (%d)" % (msg,hr)) err = hr --- 682,687 ---- customOptionHandler(*(opts,)) print("Service updated") ! except win32service.error as exc: ! print("Error changing service configuration: %s (%d)" % (exc.strerror,exc.winerror)) err = hr *************** *** 699,705 **** RemoveService(serviceName) print("Service removed") ! except win32service.error as xxx_todo_changeme6: ! (hr, fn, msg) = xxx_todo_changeme6.args ! print("Error removing service: %s (%d)" % (msg,hr)) err = hr elif arg=="stop": --- 692,697 ---- RemoveService(serviceName) print("Service removed") ! except win32service.error as exc: ! print("Error removing service: %s (%d)" % (exc.strerror,exc.winerror)) err = hr elif arg=="stop": *************** *** 711,717 **** else: StopService(serviceName) ! except win32service.error as xxx_todo_changeme7: ! (hr, fn, msg) = xxx_todo_changeme7.args ! print("Error stopping service: %s (%d)" % (msg,hr)) err = hr if not knownArg: --- 703,708 ---- else: StopService(serviceName) ! except win32service.error as exc: ! print("Error stopping service: %s (%d)" % (exc.strerror,exc.winerror)) err = hr if not knownArg: Index: win32evtlogutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32evtlogutil.py,v retrieving revision 1.10.4.3 retrieving revision 1.10.4.4 diff -C2 -d -r1.10.4.3 -r1.10.4.4 *** win32evtlogutil.py 27 Nov 2008 11:31:07 -0000 1.10.4.3 --- win32evtlogutil.py 11 Dec 2008 05:45:21 -0000 1.10.4.4 *************** *** 60,66 **** win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, \ "SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName)) ! except win32api.error as xxx_todo_changeme: ! (hr, fn, desc) = xxx_todo_changeme.args ! if hr != winerror.ERROR_FILE_NOT_FOUND: raise --- 60,65 ---- win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, \ "SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s" % (eventLogType, appName)) ! except win32api.error as exc: ! if exc.winerror != winerror.ERROR_FILE_NOT_FOUND: raise |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:29
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/test Modified Files: Tag: py3k test_exceptions.py Log Message: merge more .py changes from the trunk (via 2to3) Index: test_exceptions.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_exceptions.py,v retrieving revision 1.2.2.5 retrieving revision 1.2.2.6 diff -C2 -d -r1.2.2.5 -r1.2.2.6 *** test_exceptions.py 26 Nov 2008 09:03:30 -0000 1.2.2.5 --- test_exceptions.py 11 Dec 2008 05:45:21 -0000 1.2.2.6 *************** *** 42,51 **** win32api.CloseHandle(1) self.fail("expected exception!") ! except win32api.error as xxx_todo_changeme: ! (werror, func, msg) = xxx_todo_changeme.args ! self.failUnlessEqual(werror, winerror.ERROR_INVALID_HANDLE) ! self.failUnlessEqual(func, "CloseHandle") expected_msg = win32api.FormatMessage(winerror.ERROR_INVALID_HANDLE).rstrip() ! self.failUnlessEqual(msg, expected_msg) def testAsStr(self): --- 42,50 ---- win32api.CloseHandle(1) self.fail("expected exception!") ! except win32api.error as exc: ! self.failUnlessEqual(exc.winerror, winerror.ERROR_INVALID_HANDLE) ! self.failUnlessEqual(exc.funcname, "CloseHandle") expected_msg = win32api.FormatMessage(winerror.ERROR_INVALID_HANDLE).rstrip() ! self.failUnlessEqual(exc.strerror, expected_msg) def testAsStr(self): |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:29
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/com/win32com/test Modified Files: Tag: py3k util.py Log Message: merge more .py changes from the trunk (via 2to3) Index: util.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/util.py,v retrieving revision 1.9.2.5 retrieving revision 1.9.2.6 diff -C2 -d -r1.9.2.5 -r1.9.2.6 *** util.py 27 Nov 2008 05:36:19 -0000 1.9.2.5 --- util.py 11 Dec 2008 05:45:21 -0000 1.9.2.6 *************** *** 1,4 **** import sys, os - import winreg as _winreg import win32api import tempfile --- 1,3 ---- *************** *** 7,19 **** import pythoncom import winerror - - try: - import cStringIO as StringIO - except: - import io as StringIO - from pythoncom import _GetInterfaceCount, _GetGatewayCount import win32com import logging def CheckClean(): --- 6,14 ---- import pythoncom import winerror from pythoncom import _GetInterfaceCount, _GetGatewayCount import win32com import logging + import winreg + import io as StringIO def CheckClean(): *************** *** 47,53 **** # have a CLSID - open it. try: ! HKCR = _winreg.HKEY_CLASSES_ROOT ! hk = _winreg.OpenKey(HKCR, "CLSID\\%s" % clsid) ! dll = _winreg.QueryValue(hk, "InprocServer32") except WindowsError: # no CLSID or InProcServer32 - not good! --- 42,48 ---- # have a CLSID - open it. try: ! HKCR = winreg.HKEY_CLASSES_ROOT ! hk = winreg.OpenKey(HKCR, "CLSID\\%s" % clsid) ! dll = winreg.QueryValue(hk, "InprocServer32") except WindowsError: # no CLSID or InProcServer32 - not good! |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:28
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/com/win32comext/axdebug Modified Files: Tag: py3k expressions.py Log Message: merge more .py changes from the trunk (via 2to3) Index: expressions.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/expressions.py,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.3 diff -C2 -d -r1.5.4.2 -r1.5.4.3 *** expressions.py 4 Dec 2008 07:32:06 -0000 1.5.4.2 --- expressions.py 11 Dec 2008 05:45:21 -0000 1.5.4.3 *************** *** 70,78 **** def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame = None): name_vals = [] ! if hasattr(object, "has_key"): # If it is a dict. ! name_vals = object.items() dictionary = object elif hasattr(object, "__dict__"): #object with dictionary, module ! name_vals = object.__dict__.items() dictionary = object.__dict__ infos = [] --- 70,78 ---- def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame = None): name_vals = [] ! if hasattr(object, "items") and hasattr(object, "keys"): # If it is a dict. ! name_vals = iter(object.items()) dictionary = object elif hasattr(object, "__dict__"): #object with dictionary, module ! name_vals = iter(object.__dict__.items()) dictionary = object.__dict__ infos = [] |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:28
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/com/win32comext/adsi/demos Modified Files: Tag: py3k scp.py Log Message: merge more .py changes from the trunk (via 2to3) Index: scp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/scp.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** scp.py 26 Nov 2008 09:03:29 -0000 1.3.4.1 --- scp.py 11 Dec 2008 05:45:21 -0000 1.3.4.2 *************** *** 43,47 **** import optparse, textwrap import traceback - import types verbose = 1 --- 43,46 ---- *************** *** 198,202 **** operation, # Add, replace, or delete SPNs ): ! assert spns not in types.StringTypes and hasattr(spns, "__iter__"), \ "spns must be a sequence of strings (got %r)" % spns # Bind to a domain controller. --- 197,201 ---- operation, # Add, replace, or delete SPNs ): ! assert type(spns) not in [str, str] and hasattr(spns, "__iter__"), \ "spns must be a sequence of strings (got %r)" % spns # Bind to a domain controller. |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:28
|
Update of /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/scripts/VersionStamp Modified Files: Tag: py3k bulkstamp.py Log Message: merge more .py changes from the trunk (via 2to3) Index: bulkstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/bulkstamp.py,v retrieving revision 1.6.4.3 retrieving revision 1.6.4.4 diff -C2 -d -r1.6.4.3 -r1.6.4.4 *** bulkstamp.py 4 Dec 2008 07:28:46 -0000 1.6.4.3 --- bulkstamp.py 11 Dec 2008 05:45:21 -0000 1.6.4.4 *************** *** 64,70 **** verstamp.stamp(vars, pathname, desc, is_dll=is_dll) numStamped = numStamped + 1 ! except win32api.error as xxx_todo_changeme: ! (hr, func, desc) = xxx_todo_changeme.args ! print("Could not stamp", pathname, "Error", hr, "-", desc) else: print('WARNING: description not provided for:', name) --- 64,69 ---- verstamp.stamp(vars, pathname, desc, is_dll=is_dll) numStamped = numStamped + 1 ! except win32api.error as exc: ! print("Could not stamp", pathname, "Error", exc.winerror, "-", exc.strerror) else: print('WARNING: description not provided for:', name) |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:28
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/Test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/com/win32comext/axdebug/Test Modified Files: Tag: py3k host.py Log Message: merge more .py changes from the trunk (via 2to3) Index: host.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/Test/host.py,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** host.py 26 Nov 2008 09:03:29 -0000 1.1.4.1 --- host.py 11 Dec 2008 05:45:21 -0000 1.1.4.2 *************** *** 110,114 **** pydebugger.AttachApp(app) cookie = pdm.AddApplication(app) ! raw_input("Waiting...") ttest.test() --- 110,114 ---- pydebugger.AttachApp(app) cookie = pdm.AddApplication(app) ! input("Waiting...") ttest.test() *************** *** 126,130 **** parentNode = None all_real_nodes = {} ! raw_input("Waiting...") print("Done") --- 126,130 ---- parentNode = None all_real_nodes = {} ! input("Waiting...") print("Done") *************** *** 137,141 **** # d.Attach() d.Break() ! raw_input("Waiting...") ttest.test() d.Close() --- 137,141 ---- # d.Attach() d.Break() ! input("Waiting...") ttest.test() d.Close() |
From: Mark H. <mha...@us...> - 2008-12-11 05:45:28
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29773/win32/Demos Modified Files: Tag: py3k win32gui_menu.py win32gui_taskbar.py Log Message: merge more .py changes from the trunk (via 2to3) Index: win32gui_taskbar.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_taskbar.py,v retrieving revision 1.9.2.4 retrieving revision 1.9.2.5 diff -C2 -d -r1.9.2.4 -r1.9.2.5 *** win32gui_taskbar.py 4 Dec 2008 07:28:46 -0000 1.9.2.4 --- win32gui_taskbar.py 11 Dec 2008 05:45:21 -0000 1.9.2.5 *************** *** 37,41 **** win32gui.UpdateWindow(self.hwnd) self._DoCreateIcons() - def _DoCreateIcons(self): # Try and find a custom icon --- 37,40 ---- *************** *** 50,54 **** if os.path.isfile(iconPathName): icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE ! hicon = LoadImage(hinst, iconPathName, win32con.IMAGE_ICON, 0, 0, icon_flags) else: print("Can't find a Python icon file - using default") --- 49,53 ---- if os.path.isfile(iconPathName): icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE ! hicon = win32gui.LoadImage(hinst, iconPathName, win32con.IMAGE_ICON, 0, 0, icon_flags) else: print("Can't find a Python icon file - using default") Index: win32gui_menu.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_menu.py,v retrieving revision 1.8.2.3 retrieving revision 1.8.2.4 diff -C2 -d -r1.8.2.3 -r1.8.2.4 *** win32gui_menu.py 4 Dec 2008 07:28:46 -0000 1.8.2.3 --- win32gui_menu.py 11 Dec 2008 05:45:21 -0000 1.8.2.4 *************** *** 250,255 **** rc = CheckMenuRadioItem(self.sub_menu, 1004, 1005, id, win32con.MF_BYCOMMAND) new_state = GetMenuState(self.sub_menu, id, win32con.MF_BYCOMMAND) ! if new_state & win32con.MF_CHECKED != check_flags: raise RuntimeError("The new item didn't get the new checked state!") else: --- 250,264 ---- rc = CheckMenuRadioItem(self.sub_menu, 1004, 1005, id, win32con.MF_BYCOMMAND) + # Get and check the new state - first the simple way... new_state = GetMenuState(self.sub_menu, id, win32con.MF_BYCOMMAND) ! if new_state & win32con.MF_CHECKED != check_flags: ! raise RuntimeError("The new item didn't get the new checked state!") ! # Now the long-winded way via GetMenuItemInfo... ! buf, extras = EmptyMENUITEMINFO() ! win32gui.GetMenuItemInfo(self.sub_menu, id, False, buf) ! fType, fState, wID, hSubMenu, hbmpChecked, hbmpUnchecked, \ ! dwItemData, text, hbmpItem = UnpackMENUITEMINFO(buf) ! ! if fState & win32con.MF_CHECKED != check_flags: raise RuntimeError("The new item didn't get the new checked state!") else: |