try:
    win32pdhutil.GetPerformanceAttributes('Process', 'ID Process', procname)
except:
    pass
pids = win32pdhutil.FindPerformanceAttributesByName(procname)
try:
    pids.remove(win32api.GetCurrentProcessId())
except ValueError:
    pass
handle = win32api.OpenProcess(win32con.PROCESS_TERMINATE, 0, pids[0])
win32api.TerminateProcess(handle, 0)
win32api.CloseHandle(handle)
Python 2.6 в Windows: как завершить subprocess.Popen с аргументом «shell = True»?