获取当前脚本的进程PID号

import os

handle=os.getpid()
原文地址:https://www.cnblogs.com/kaibindirver/p/13180037.html