来源:https://blog.csdn.net/LCY133/article/details/107151882
import os print(os.getpid()) print(os.getppid())