Ok, I'm able to parse Event51 logs now.

However, there seems to be a problem with the  object returned from
ReadEventLogs()

GetNumberOfEvents() tells me there are 6 events.

I can see all sixe events using the EventViewer in Control Panle, on Widnwos XP.

However, the iterator returned from RedEvent Log() is consumned after
only 3 events.

    hand=win32evtlog.OpenBackupEventLog(None,logFilename)
    numEvents=win32evtlog.GetNumberOfEventLogRecords(hand)
    print'\n\t%lu events were found' % numEvents
    flags = 
win32evtlog.EVENTLOG_BACKWARDS_READ|win32evtlog.EVENTLOG_SEQUENTIAL_READ
    events=win32evtlog.ReadEventLog(hand,flags,0)

    for ev_obj in events:
         #stops iterating after only 3 events

Would someone verify this?

I see this problem on Python 2.3 and 2.5.4, with Pywin32 Build 213


Thanks

Tony
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to