
    r@;j                     ~    d dl Z d dlZd dlZd dlZd Zedk    r# ed            ed            ed           dS dS )    Nc                    t          j        dt          j        t          j                                         }d}	 |dk    rdnd| }t          j                            t          j                    | | d|  d          }t          j                            |          sn|dz  }l	 t          j
        d |           }n-# t          j        $ r}t          d|           Y d }~d S d }~ww xY w	 t          j        |          dk    r)t          d	| z             	 t          j        |           d S t          j        ||           t          d
|  d|            t          j        |           d S # t          j        |           w xY w)Nz%Y%m%dr   T -z.evt   zCould not open the event logz*No records in event log %s - not backed upz
Backed up z log to )timestrftime	localtimeospathjoinwin32apiGetTempPathexistswin32evtlogOpenEventLogerrorprintGetNumberOfEventLogRecordsCloseEventLogClearEventLog)logType
datePrefixretryindexfnamehlogdetailss          jC:\Users\Administrator\AppData\Local\Temp\2\pip-target-b0z114gj\lib\python\win32/scripts/backupEventLog.pyBackupClearLogr   	   s   x	)D)DEEJEqjjk%kk ""05007000
 
 w~~e$$ 	
'g66   ,g666(1$771<<>HIII 	!$''''' 	!$...3733E33444!$'''''!$''''s*   )B? ?C)C$$C)-*E. .*E. .F__main__ApplicationSystemSecurity)r
   r   r   r   r   __name__     r   <module>r'      s    				      ( ( (8 zN=!!!N8N: r&   