def write(self, text):
text = str(text)    <EOL>text = text.replace(IAC, IAC+IAC)<EOL>text = text.replace(chr(<NUM_LIT:10>), chr(<NUM_LIT>)+chr(<NUM_LIT:10>))<EOL>self.writecooked(text)<EOL>
Send a packet to the socket. This function cooks output.