3 ms·
> As with GIMP 2.10, GIMP 3.0 ships with a Python interpreter embedded and will not use the system Python. This is great and I wish this was the same with othe
by amelius 2y ago
> As with GIMP 2.10, GIMP 3.0 ships with a Python interpreter embedded and will not use the system Python.
This is great and I wish this was the same with other tools, like Kicad, Freecad and Inkscape.
- bobek 2y agoFreeCAD actually uses python for scripting. The console is a python repl. https://wiki.freecad.org/Python https://wiki.freecad.org/Python
- amelius 2y agoWell the question is if it relies on the system Python, or if it ships its own version.
- RugnirViking 2y agoDoesn't Inkscape use its own python? I feel like I've found its python a couple times when searching for venvs on windows
- Hackbraten 2y agoFor me on Arch Linux, Inkscape definitely doesn’t ship with its own Python. and its source code suggests to me [0] that it shells out to any Python (or Perl, or Ruby, or shell) that it can find on the PATH. [0]: https://gitlab.com/inkscape/inkscape/-/blob/5c4c6d116dae5250d75d34a45f0d9220824d2e20/src/extension/implementation/script.cpp#L78-100 https://gitlab.com/inkscape/inkscape/-/blob/5c4c6d116dae5250...
- 2mlWQbCK 2y agoIt probably ships with python on some platforms. Pretty sure it does on Windows. But it does not really have a python API. Most (all?) extensions that ship with Inkscape are written in python, and it comes with some base classes and helper modules to make those extensions. But the "API" is basically "we send the current document to the extension's stdin, and whatever comes out as stdout becomes the new document". The extension, written in Python or something else, is responsible for handling all the quirks of SVG (a mix of subsets of two or more of the SVG specs) and (the current version of) Inkscape's additions to SVG. It is quite painful. I have maintained a couple of third-party extensions written in python since back in Inkscape 0.99.x days (ca 2007). Had to do several annoying major rewrites. Since there is no real API you depend on whatever happens to be in those helper classes, rarely documented and never stable. One of my extension, as do some of the first-party extensions, have to rely on launching Inkscape as a sub-process to perform some work, since there is no way to call in to the running Inkscape. If there was a real API you could have functions to call to query about the boundaries of objects, and other functions to apply changes to objects, that could use internal implementations that are already existing and that can do those things. But the way it works now (and always worked in Inkscape) is that you have to take care of everything yourself, more or less, maybe helped by some of the included helpers if you are lucky to find something that does something similar to what you want to do. Pretty much done with this. I stopped officially supporting new Inksape versions. I just tell users that the next time Inkscape messes with their not-really-API my extensions will be dead. I can still run them with old Inkscape in some virtual machine. Maybe I will re-implement everything if I find an application that has strong backwards-compatibility goals.
- stuaxo 2y agoOh, that's kind of terrible. I had assumed there would be an API to let you do stuff with the DOM and call into some of the functions inkscape itself uses.
- f1shy 2y agoGdb
- dp-hackernews 2y agoYou kind of get that sort of thing for free if you use Nix as your package manager, along with home-manager - check the link below for more info https://nixos-and-flakes.thiscute.world/introduction/ https://nixos-and-flakes.thiscute.world/introduction/
- cpach 2y agoTrue, but this only helps a small fraction of the application’s userbase.
- ElectRabbit 2y agoKicad brings its own Python and is fully interfaceable.
- sycren 2y agoBut would that make it so that it's impossible to install/access other libraries?
- chromakode 2y agoBlender has done this since Dec 2000.