import os
from subprocess import check_call, STDOUT
DEVNULL = open(os.devnull, 'wb')
try:
    check_call(('taskkill', '/PID', str(p.pid)), stdout=DEVNULL, stderr=STDOUT)
finally:
    DEVNULL.close()
Disable console output from subprocess.Popen in Python