Calling select in python

后端 未结 2 637
天涯浪人
天涯浪人 2021-01-25 08:18

I am trying to write a socket server. The server itself doesn\'t accomplish anything all that interesting. Right now my problem is that python is complaining about my arguments

相关标签:
2条回答
  • 2021-01-25 08:40

    You need to pass in three sequences of file descriptors as arguments to select, from the names you supply I think that [clients, signals] might be some other construct (is clients a list of file descriptors?). In this case you could use clients+signals as second argument to select.

    In other words: Each argument must be a flat sequence, no nesting is allowed.

    0 讨论(0)
  • 2021-01-25 08:55

    I guess clients is an array. Try read_client_sockets=[the_socket] + clients instead.

    0 讨论(0)
提交回复
热议问题