Try IRC IT (II) from suckless (http://tools.suckless.org/ii).
Quoting:
ii is a minimalist FIFO and filesystem-based IRC client. It creates an irc
directory tree with server, channel and nick name directories. In every
directory a FIFO in file and a normal out file is created.
The in file is used to communicate with the servers and the out files
contain the server messages. For every channel and every nick name there
are related in and out files created. This allows IRC communication from
command line and adheres to the Unix philosophy. example
Join a channel as follows: $ echo "/j #wmii" > in and ii creates a new
#wmii (channel) directory with in and out files.
It's all file based, so it works in almost any programming language in the
world :D
--
http://mail.python.org/mailman/listinfo/python-list