obtaining pid of a python script inside the script itself May 28, 2019 import os print "This process has the PID", os.getpid() References https://stackoverflow.com/questions/32649125/obtaining-pid-of-a-shell-python-script-inside-the-script-itself Related