Re: Python extensions for Sodipodi
"Lauris Kaplinski" <[email protected]> Fri, 25 Jun 2004 14:47:54 +0300
| Newsgroups | gmane.comp.graphics.sodipodi |
|---|---|
| Message-ID | <039401c45aaa$40baf170$911728c1@BOA> |
Hello! This seems interesting :) What are repr-obj.* for? I'd avoid making SPReprs into GObjects if possible. If plain XML API is needed, we can implement it on top of SPObject instead (sp_object_seAttribute etc.) I am all for continuing this work, as long as it does not involve extensive changes in sodipodi. But maybe you could outline, what the realistic short-term goals for python integration could be, keeping in mind, that sodipodi API is not very stable, so constant updating of python part may be needed for certain functionalities. Keep up the good work! Best wishes, Lauris Kaplinski ----- Original Message ----- From: "John Stracke" <[email protected]> To: "Sodipodi" <[email protected]> Sent: Sunday, June 06, 2004 4:28 AM Subject: [Sodipodi-list] Python extensions for Sodipodi > 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| > |[email protected]|for people we despise, we don't believe in | > | |it at all. -- Noam Chomsky | > \=================================================================/ > My medieval art for sale: http://www.thibault.org/store/ > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com