
Hello,
I've been playing around with adding Python support to Inkscape for some time. In contrast to the current extension system that runs the interpreter externally, this allows to use Inkscape functionality via Python code.
Progress has been slow, since I am new to mostly anything necessary to implement it (C++, CMake, GTK, git, even Python). I decided to do the implementation manually (without SWIG, Boost.Python, etc.) since there's already enough new stuff for me to deal with.
At the current state, there is not much to show, but some of the infrastructure is in place: * Inkscape-integrated Python console with basic command history and limited coloring (different colors for log messages, input, output and errors) * A pane to select Python files and run them * A rudimentary set of bindings: * Arbitrary Inkscape verbs can be run * Files can be opened * Files can be saved. Selecting the output file type on basis of a MIME type, i.e., export to other file types than .svg is supported, but the user interaction dialog for the export settings pops up. * PNG export * Listing and activating desktops (open files) * Running Python scripts from the command line is possible, although only in non-GUI mode for now.
Since the basics are working I decided it would be a good point to share the code and check if you think this is a direction worth pursuing. Especially, since some design decisions that should be discussed beforehand are ahead.
Please let me know how to submit the code. Would you like a patch against current master or should I create a Gitlab account?
wiesi