title: Reading windows event log in Python using pywin32 (win32evtlog module)
body: <p>I would like to read Windows' event log. I am not sure if it's the best way but I would like to use the <strong>pywin32 -> win32evtlog module</strong> to do so. First and foremost is it possible to read logs from <strong>Windows 7</strong> using this library and if so how to read events associated with applications runs (running an .exe must leave a trace in the event log in windows i guess).</p>
  
  <p>I have managed to find some little example on the net but it's not enough for me and the documentation isn't well written unfortunately ;/</p>
  
  <pre><code>import win32evtlog
  
  hand = win32evtlog.OpenEventLog(None,"Microsoft-Windows-TaskScheduler/Operational")
  print win32evtlog.GetNumberOfEventLogRecords(hand)
  </code></pre>