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.
|