title: Python & parsing IRC messages
body: <p>What's the best way to parse messages received from an IRC server with Python according to the RFC? I simply want some kind of list/whatever, for example:</p>
  
  <pre><code>:test!~test@test.com PRIVMSG #channel :Hi!
  </code></pre>
  
  <p>becomes this:</p>
  
  <pre><code>{ "sender" : "test!~test@test.com", "target" : "#channel", "message" : "Hi!" }
  </code></pre>
  
  <p>And so on?</p>
  
  <p>(Edit: I want to parse IRC messages in <strong>general</strong>, not just PRIVMSG's)</p>