List process IDs including scripts with given name

pidof

pidof -x {{script.py}}

click the source code to copy install pidof on any operating system with command-not-found.com