problem with python win32 and win32evtlog

Konrad Mauz kmauz at kmauz.de
Mon May 19 14:24:42 EDT 2003


Hello,

I'me trying to write a script to summerize an win2k eventlog.

I thought, with the following code, all events in "system" on
host "sam" should be in the list "allevents".
But only 6 events are in the list.
The win2k eventlog contains more the hundred entries.

Is there something wrong with my code?

I'am using Python 2.2.2 python win32 extension build 150
on win2k german version.

Here the the relevant part of code:

--schnipp--
#
#
import win32evtlog
import time

system_handle=win32evtlog.OpenEventLog("SAM", "System")
flags=win32evtlog.EVENTLOG_BACKWARDS_READ|win32evtlog.EVENTLOG_SEQUENTIAL_READ
allevents=win32evtlog.ReadEventLog(system_handle, flags,0)

print len(allevents)
--schnapp--

Any hints, solutions, comments are welcome.

Regards,
	Konrad

-- 
Konrad Mauz 
kmauz at kmauz.de




More information about the Python-list mailing list