# -*- coding: utf-8 -*-
from win32com.client import GetObject

WMI = GetObject('winmgmts:')

processes = WMI.InstancesOf('Win32_Process')

for p in processes :
  _p_name = p.Properties_('Name').Value
  _p_pid = p.Properties_('ProcessId').Value
>>>...