I am trying to get a basic server (copied from Beginning Python) to send a str.
The error:
c.send( \"XXX\" ) TypeError: must be bytes or buffer, not
To add to Jacek Konieczny's answer: You can also use str.encode() to get bytes from a string. If you have the string in a variable instead of a literal, you can call encode and it will return an equivalent series of bytes.