Update of /cvsroot/pywin32/pywin32/win32/Demos
In directory sc8-pr-cvs1:/tmp/cvs-serv16177
Modified Files:
eventLogDemo.py
Log Message:
Handle unicode in the log.
Index: eventLogDemo.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/eventLogDemo.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** eventLogDemo.py 3 Feb 2003 00:30:29 -0000 1.4
--- eventLogDemo.py 7 Jun 2003 02:08:45 -0000 1.5
***************
*** 18,22 ****
for object in objects:
# get it for testing purposes, but dont print it.
! msg = str(SafeFormatMessage(object, logType))
if object.Sid is not None:
try:
--- 18,22 ----
for object in objects:
# get it for testing purposes, but dont print it.
! msg = SafeFormatMessage(object, logType).encode("mbcs")
if object.Sid is not None:
try:
***************
*** 35,39 ****
if numRecords == num:
! print "Successfully read all records"
else:
print "Couldn't get all records - reported %d, but found %d" % (numRecords, num)
--- 35,39 ----
if numRecords == num:
! print "Successfully read all", numRecords, "records"
else:
print "Couldn't get all records - reported %d, but found %d" % (numRecords, num)
|