from sodi list:
-----Forwarded Message-----
From: John Stracke <francis+keyword+sodipodi.6389c0@...99...> To: Sodipodi sodipodi-list@lists.sourceforge.net Subject: [Sodipodi-list] Python extensions for Sodipodi Date: Sat, 05 Jun 2004 21:28:12 -0400
I've been wanting a scripting language for Sodipodi for some time (like the Scheme scripting for the GIMP), so I started work on some extensions to support Python scripting. I've attached the patch (against the current CVS tip), which basically does a proof-of-concept: it adds a "Py" menu to the main menubar, with some commands written in Python. Obviously, if we decide to go down this path, we'll need some better integration--at the moment, those commands are all hard-coded in src/sodipodi.py; we need some way to have the user write their own Python without having to reinstall Sodipodi.
At the moment, not all of the subclasses of SPItem are exposed; only SPText is. One of the example commands makes use of SPText to do word wrapping (although, at the moment, the width to wrap to is hard-coded).
To apply the patch, first update to the CVS tip. Then extract the tarfile in the top-level sodipodi directory; this will give you a bunch of new source files, plus python.patch, which you can apply with:
patch -p1 <python.patch
Now you need to rerun autogen.sh (because there are some changes to configure.in):
./autogen.sh --with-python
(Unless you specify --with-python, to autogen.sh or configure, it will default to not including the Python extensions, for safety's sake.) Now just make and run.
You will need to cd to src in order to run, unless you install; it expects to find sodipodi.py either in the current directory or in the place where it gets installed. If you've got a version configured --with-python, and you want to run without Python, you can pass --without-python on the sodipodi command line.
So. What do you guys think? Shall we work on this?
/=================================================================\ |John Stracke | http://www.thibault.org |HTML OK | |Francois Thibault |============================================| |East Kingdom |If we don't believe in freedom of expression| |francis@...99...|for people we despise, we don't believe in | | |it at all. -- Noam Chomsky | =================================================================/ My medieval art for sale: http://www.thibault.org/store/