It’s just data

wxirc

A small irc client using wxPython.

This is really cool (though screenshots might help the curious). One little thing however:

elif cmd.startswith("/NICK "): config.nick=cmd[6:].strip()

You shouldn't actually change your nick in the client until you receive a positive NICK response from the server - for example what if you change your nick to an already existing one, and it's denied?

This could perhaps go in doResponse. Also, I don't see that you handle PING/PONG - which are required if you're ever idle more than 90-120 seconds on most servers.

Very cool in such a short space however!

Posted by Aaron Brady at

Aaron, this client certainly is far from being robust just yet.  What I find exciting, however, is yesterday morning I knew literally nothing about the protocol IRC uses and yet I was able to pull this together.  The hardest thing was handling the threading - the window would freeze up until I introduced wxPostEvent.

Posted by Sam Ruby at

PYTHONPATH=$PYTHONPATH:. python wxirc.py
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in __bootstrap
  self.run()
  File "wxirc.py", line 24, in run
  handle.settimeout(1.0)
AttributeError: '_socket.socket' object has no attribute 'settimeout'

Segmentation fault

Posted by Grabis at

settimeout is new in Python 2.3

If you want a solution that works with Python 2.2, take a look at timeoutsocket.

Posted by Sam Ruby at

Another Basic Brain Dump

Hovering somewhere between exhaustion and braindeath right now. I've been studying non stop for what seems like forever. Apparently the...... [more]

Trackback from Team Murder

at

Add your comment