Get the process name by pid : <p>I have a python program. It stores a variable called "pid" with a given pid of a process. First of all I need to check that the process which owns this pid number is really the process I'm looking for and if it is I need to kill it from python. So first I need to check somehow that the name of the process is for example "pfinder" and if it is pfinder than kill it. I need to use an old version of python so I can't use psutil and subprocess. Is there any other way to do this?</p>
