python根据端口号杀死linux、windows进程 import os import platform import re def kill_linux_port(port): ret = os.popen("netstat -lnp|grep " + str(port