Python获取当前脚本进程PID

import os
pid = os.getpid()
print('pid : ',pid)

  

原文地址:https://www.cnblogs.com/lucktomato/p/15169103.html