""" Kill processes on port 8000 """ import os import signal # List of PIDs to kill pids = [14712, 46860, 28572, 49516, 49676, 40708, 34232, 37560, 35272, 12792] for pid in pids: try: os.kill(pid, signal.SIGTERM) print(f"Killed process {pid}") except ProcessLookupError: print(f"Process {pid} not found") except Exception as e: print(f"Error killing process {pid}: {e}")