code: def is_http_running_on(port):
    
    try:
      conn = httplib.HTTPConnection('127.0.0.1:' + str(port))
      conn.connect()
      conn.close()
      return True
    except Exception:
      return False
docs: Check if an http server runs on a given port.
  
    Args:
      The port to check.
    Returns:
      True if it is used by an http server. False otherwise.