How to detect when subprocess asks for input in Windows
问题 I have a subprocess that either quits with a returncode, or asks something and waits for user input. I would like to detect when the process asks the question and quit immediately. The fact that the process asks the question or not is enough for me to decide the state of the system. The problem is that I cannot read the question because the child process probably does not flush standard output. So I cannot rely on parsing subprocess.Popen().stdout : when trying to read it, well, it blocks