Python equivalent of PowerShell Get-EventLog
Question: In PowerShell you can run this command to list all of the different Event Log
folders on a server:

    
    
    Get-EventLog -list
    

Is there a way to do this in Python? I've seen many posts about how to get
logs from a specific folder (using e.g. `win32evtlog`), but not how to
retrieve a list of all the Event Log folders. I'm running Windows Server 2008.


Answer: Figured it out.

    
    
    >>> import win32evtlog
    >>> x = win32evtlog.EvtOpenChannelEnum()
    >>> win32evtlog.EvtNextChannelPath(x)
    u'Application'
    >>> win32evtlog.EvtNextChannelPath(x)
    u'HardwareEvents'
    >>> win32evtlog.EvtNextChannelPath(x)
    u'Internet Explorer'
    >>>
    

