On Mon, Jan 20, 2003 at 11:57:09AM +0200, Einar Karttunen wrote:
> An another important point would be to make the scripting features
> language independent i.e. not tie irssi with perl in any special way.
> Just define a clean interface to which languages can easily attach
> themselves.

Actually, I had started on an irssi-python module. I figured out the
conceptually difficult parts of embedding the interpreter, and
wrapped one of the object types (SERVER) in a Python class. With some
ideas from Timo, I got signal passing working as well, and got the
python refcounting to mesh with irssi refcounting as well, I think :)

What's left is better error handling, filling out more of the irssi
object types (including figuring out how exactly to represent a type
like SERVER-CONNECT which is entangled with SERVER, but isn't exactly a
super- or sub-class), and some other less interesting but necessary
feature decisions, like whether to attempt to provide a module unload
function in irssi or just require scripts to know how to do it.

I haven't done much with the module in the last several months, though.

> Maybe using SWIG (http://www.swig.org) is an option for
> this...

I briefly played with SWIG. It didn't seem to be very easy to map
the irssi API to objects as SWIG imagines them, and I wanted the Python
interface not to just be a bunch of C-like functions. It'd be nice if a
rewrite made this easier. :)

What I'd like to see most after a rewrite is some C API documentation.
:)

Reply via email to