Sadly your Python code lost its formatting but I believe I found your “cannot send” issue.
Twitch IRC chat does need the “\r\n” at the end of each message string and I do not see that in your code for sending messages to the chat. You have it for the PONG reply.
As for receiving, did you check your code as 3ventic suggested?
Finally, are you using Python 2.7 or Python 3.x?