Does python's sys.stdin.read() block?

前端 未结 3 1449
粉色の甜心
粉色の甜心 2021-01-12 17:18

I\'m adapting this Django management command for my own purposes. The script is a simple while-loop daemon that reads from sys.stdin (line 152, in command.handle()

3条回答
  •  不思量自难忘°
    2021-01-12 17:31

    It works OK on my machine (i.e. blocks with negligent CPU usage while it's reading) - can you check it from a simple command line script before? Also, I tested this within Linux, might be different on other platforms.

提交回复
热议问题