Update of /cvsroot/pywin32/pywin32/win32/Demos
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2518/win32/Demos
Modified Files:
Tag: py3k
SystemParametersInfo.py desktopmanager.py eventLogDemo.py
Log Message:
merge test/demo fixes from the trunk
Index: desktopmanager.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/desktopmanager.py,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** desktopmanager.py 29 Aug 2008 04:59:23 -0000 1.2.2.1
--- desktopmanager.py 11 Dec 2008 07:17:46 -0000 1.2.2.2
***************
*** 3,7 ****
import win32api, win32con, win32gui, win32service, win32process
import pywintypes
! import traceback, _thread, time, io
## "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 io
## "Shell_TrayWnd" is class of system tray window, broadcasts "TaskbarCreated" when initialized
Index: eventLogDemo.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/eventLogDemo.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
*** eventLogDemo.py 11 Dec 2008 07:06:51 -0000 1.5.4.3
--- eventLogDemo.py 11 Dec 2008 07:17:46 -0000 1.5.4.4
***************
*** 42,46 ****
win32evtlog.CloseEventLog(h)
! def Usage():
print("Writes an event to the event log.")
print("-w : Dont write any test records.")
--- 42,46 ----
win32evtlog.CloseEventLog(h)
! def usage():
print("Writes an event to the event log.")
print("-w : Dont write any test records.")
***************
*** 75,79 ****
computer = val
if opt in ['-h', '-?']:
! Usage()
return
if opt=='-r':
--- 75,79 ----
computer = val
if opt in ['-h', '-?']:
! usage()
return
if opt=='-r':
Index: SystemParametersInfo.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/SystemParametersInfo.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
*** SystemParametersInfo.py 29 Aug 2008 04:59:23 -0000 1.1.4.1
--- SystemParametersInfo.py 11 Dec 2008 07:17:46 -0000 1.1.4.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
|