Talking about that (scripting Inkscape), I am currently looking in details the way Python (which is my primary skilled language) is used in Inkscape.
For now, I am trying to rewrite the inkex.py and all the helper modules so I can write extension scripts the Python way (which I find is not the case today). The code I am writing is dependant on numpy, whih I know can be problematic for Inkscape since it would add an external dependancy. However, I nticesd that at least one extension is actually using numpy (that's what decided me to make numpy a preriquisity of my code).
I'll publish my code as soon as I have something that I can decently make public. My goal is to make path ans objects manipulations as easy as possible, without having to deal with SVG xml node or so in any way. I want to be able to add paths, etc. I other words, to have a nice object API to create effects easily.
However, trying to understand how Python scripting work in Inkscape, I was wondering why the Python interpreter is embedded in the Inkscape executable, according the way Python effects work (simply a Python program that is runned with SVG file in /tmp or so, and with parameters on command line). Why not simply use the Python executable provided by the platform. Any Linux and MacOSX station do have Python installed. In win32, heee, let's ask user to install the Python package if she wants nice scripted effects.
So my question is: what is the state of (and roadmap for) using Python as real scripting language for Inkscape (I mean exporting the Inkscape API at Python level), which seem to be the goal of the stuff (if I understand the
runme.py file in src/extention/script).
When I have done with my idea on Python effect helpers modules, I may help in implementing this aspect in Inkscape (I don't have that much time free for Inkscape, but I can give 1h/day, during train trip).
David
On Thu, Feb 15, 2007 at 06:19:39PM -0300, Aur?lio A. Heckert wrote:
> Hi,
>
> I do not find anything about the "script window" of the Inkscape.
>
> I only know that i need to comple with "--with-python" and/or "--with-perl".
>
> How can i use this? An script hire can access the inkscape features?
> An internal API like:
> Inkscape::pathsUnion( $id1, $id2 );
> Inkscape::pathsIntersection( $id1, $id2 );
>
> Something like that?
No, this is not implemented yet. It will be in the future though.
Bryce
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel