Best way to open a socket in Python

前端 未结 3 1771
难免孤独
难免孤独 2020-12-14 06:07

I want to open a TCP client socket in Python. Do I have to go through all the low-level BSD create-socket-handle / connect-socket stuff or is there a simpler one-line way?

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 06:25

    For developing portable network programs of any sort in Python, Twisted is quite useful. One of its benefits is providing a convenient layer above low-level socket APIs.

提交回复
热议问题