Why is my output from a subprocess delayed, when it is generated from a Python thread?
This an extension to my posting from yesterday, which is still unsolved: Why does my Python thread with subprocess not work as expected? In the meantime I found some interesting details, so I decided to create a new posting. To bring it to the point: There are some issues, when a subprocess is generated out of a thread. Platform: Windows 7 Enterprise, Python 3.6.1 In the following code I want to run a C-executable and get its output to stdout into a string. For test purposes the executable accepts two parameters: a delay and a filename (not used here). The program writes Sleep now to stdout ,