Passing data from Python to Arduino over ethernet
In Python, msg = "255" will make msg a string type using those quotes around 255.

Your Arduino code is making this comparison: if(recv == 255) 

This is going to do an integer comparison.  A string "255" is not going to equal the integer 255 and I'm not sure how the data is going to be received and formatted on the Arduino using client.read(), it's probably returning the first byte out of that string.

In any case, you'll have to keep things consistent byte for byte in your python code and your arduino code.

EDIT: 

After some further reading: 

client.read() Returns The next byte (or character), or -1 if none is available.  So you either need to house that function in a loop and terminate on -1 (which is a bad idea in my opinion - in the case that you do want to send the value -1 in your data stream) or you can do what Joby Taffey suggested, build a basic protocol and state the number of bytes of content that will follow.