Python wait until data is in sys.stdin

后端 未结 9 1312
隐瞒了意图╮
隐瞒了意图╮ 2020-12-15 23:00

my problem is the following:

My pythons script receives data via sys.stdin, but it needs to wait until new data is available on sys.stdin.

As described in th

9条回答
  •  忘掉有多难
    2020-12-15 23:09

    I know this is an old thread but I stumbled upon the same problem and figured out that this was more to do with how the script was invoked rather than a problem with the script. At least in my case this turned out to be the problem with the 'system shell' on debian (ie: what /bin/sh is linked to -- this is what apache uses to execute the command that CustomLog pipes to). More info here: http://www.spinics.net/lists/dash/msg00675.html

    hth, - steve

提交回复
热议问题