You can use makefileit if you find the user-friendly Python interface. For example, you can use methods such as readlinesin a socket (you will have to implement it manually when using recv). This may be more convenient when sending text data to a socket, but YMMV.
source
share