def stopListening():
 global _listener
 logging._acquireLock()
 try:
  if _listener:
   _listener.abort = 1
   _listener = None
 finally:
  logging._releaseLock()

def stopListening ( ) : global _listener logging . _acquireLock ( ) try : if _listener : _listener . abort = 1 _listener = None finally : logging . _releaseLock ( )
stop the listening server which was created with a call to listen() .