Search code examples
pythonsocketsirc

How do you address data returned to a socket in python?


Say you are telneting into IRC to figure out how it all works. As you issue commands the IRC server returns data telling you what it's doing. Once I have created a default script that basically is how a normal IRC connection between server and client occurs, if it ever deviates from that it won't tell me what is wrong. I need to be able to throw exceptions based on what the server returns to me. How do I do that in python?


Solution

  • Here's a tutorial which pretty much walks you through an IRC client using sockets in Python: