def RemoveSourceFromRegistry(appName, eventLogType='Application'):
 try:
  win32api.RegDeleteKey(win32con.HKEY_LOCAL_MACHINE, ('SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s' % (eventLogType, appName)))
 except win32api.error as (hr, fn, desc):
  if (hr != winerror.ERROR_FILE_NOT_FOUND):
   raise

def RemoveSourceFromRegistry ( appName , eventLogType = 'Application' ) : try : win32api . RegDeleteKey ( win32con . HKEY_LOCAL_MACHINE , ( 'SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s' % ( eventLogType , appName ) ) ) except win32api . error as ( hr , fn , desc ) : if ( hr != winerror . ERROR_FILE_NOT_FOUND ) : raise
removes a source of messages from the event log .