I\'ve successfully been able to copy the file contents (image) to a new file. However when I try the same thing over TCP sockets I\'m facing issues. The server loop is not e
you may change your loop condition according to following code, when length of l is smaller than buffer size it means that it reached end of file
while (True): print "Receiving..." l = c.recv(1024) f.write(l) if len(l) < 1024: break