how to check windows system process for python ?

I can get process pid and path.

 code here : 

**import** psutil
getPiD = psutil.pids()

**from** win32com.client **import** GetObject


def Process_path(pid):
    WMI = GetObject('winmgmts:')
    processes = WMI.InstancesOf('Win32_Process')
    for p in processes :
        if p.Properties_("ProcessID").Value == pid:
            return p.Properties_[7].Value
    return "no such process"


for i in getPiD:
    print(Process_path(i))

**\>\>\> C:\Windows\System32\svchost.exe**

but, how to check windows system process for python ?

 example console :

C:\Windows\System32\svchost.exe
>>> **true**
C:\Program Files\test.exe
>>> **false**