I recently became aware of a Python plugin for irssi, which conveniently resides in the irssi SVN repository. This plugin presumably exposes an API very similar to the one used in the Perl plugin, so creating new scripts should be easy with all those Perl samples out there.
There’s an useful guide for building the plugin here, but I found that some lose ends still needed to be patched up.
For one, the plugin apparently hasn’t been updated in a while, so some function calls still reference old irssi structures and functions. Naturally, these don’t compile with irssi 0.8.15, which is the latest version as of this writing. For those issues, I compiled a patch with various fixes here. This isn’t exactly a perfect fix, but should do in most cases. (The name is still 0.8.14 as that is the version it was originally written for, but it still applies cleanly for 0.8.15)
There is one more catch that isn’t mentioned in above guide: The plugin tries to load irssi_startup.py on startup, which will have to be on a specific path to be found. Without any parameters to ./configure, that will be /usr/local/share/irssi/scripts. So, if you’d rather have it in /usr/share/irssi/scripts (this is where my distribution places scripts, at least), you have to explicitly specify this when calling ./configure:
./configure --with-irssi=<path to irssi sources> \
--datadir=/usr/share
After that, make should (hopefully) work and libpython.so will be placed in src/.libs/. This file should be moved to irssi’s module directory, which should be /usr/lib/irssi/modules or /usr/local/lib/irssi/modules, depending on distribution.
Copy irssi_startup.py and irssi.py from src/ to the data directory you specified above, and irssi should be able to load the Python plugin without problems via /load python.