
2014-02-25 23:04 GMT+01:00 Martin Owens <doctormo@...400...>:
On Tue, 2014-02-25 at 19:17 +0100, Krzysztof Kosiński wrote:
As a backup option, I'm considering changing my MSc project to implementing a Python scripting console for Inkscape. If I were to pick that instead, the GSoC project could involve a variety of refactoring tasks intended to simplify writing the Python bindings used by the console.
Wouldn't it be better to complete the DBus bindings for inkscape? Python has a very good dbus implantation that could be effectively wrapped for such a thing allowing process separation between python code operating on drawings and inkscape codebase.
The main reason behind the existence of the DBus API would be programming language neutral, so you can theoretically write plugins in any language. However, language neutrality is actually not that great when it comes to plugins. To fix a bug in an existing script, you have to know its language, and it could be anything.
Moreover, binding things via DBus adds lots of complexity which simply don't exist in a simple Python binding. According to the "worse is better" principle, using the simpler solution will cause usable features to be developed much more quickly, even if this solution is not technically ideal.
Then it's just a matter of launching extensions with the dbus drawing id and let the wrapper take care of interacting with inkscape. you could have a python shell, live drawing extensions... lots of things really.
All of this would still work over IPC, so the performance wouldn't be that great. While implementing a new interactive tool in a Python plugin is entirely possible, doing it in a different process might be too much.
The tricky point is getting dbus working on windows. http://www.freedesktop.org/wiki/Software/dbus/#index6h1 It should be possible to depend on the in-tree windows port from fdo's development branch if it works. Since it's windows we don't need to care too much if something is packaged or stable beyond stable enough for inkscape.
Given the recent developments (kdbus), it seems to me that DBus is not really intended as a cross-platform solution.
Anyway, this is a backup project - my main idea is boolops / stroke-to-path.
Regards, Krzysztof