- getpid
- getppid
Get process ID
- Works on all 3 Operating systems
examples/os/getpid.py
import os print(os.getpid()) print(os.getppid())
93518 92859
This is on Linux/OSX
echo $$
import os print(os.getpid()) print(os.getppid())
93518 92859
This is on Linux/OSX
echo $$