startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
return subprocess.Popen([command] + args, startupinfo=startupinfo).wait()
if __name__ == '__main__':
    pass
How do I eliminate Windows consoles from spawned processes in Python (2.7)?