Can select() be used with files in Python under Windows?

前端 未结 3 975
情话喂你
情话喂你 2020-12-06 07:07

I am trying to run the following python server under windows:

\"\"\"
An echo server that uses select to handle multiple clients at a time.
Entering any line          


        
3条回答
  •  日久生厌
    2020-12-06 07:40

    Of course and the answers given are right... you just have to remove the sys.stdin from the input but still use it in the iteration:

    for s in inputready+[sys.stdin]:

提交回复
热议问题