def launchWithoutConsole(command, args):
    """Launches 'command' windowless and waits until finished"""
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
return subprocess.Popen([command] + args, startupinfo=startupinfo).wait()
Как удалить консоли Windows из порожденных процессов в Python (2.7)?