KIPI plugins and Python

Gilles Caulier caulier.gilles at gmail.com
Thu Mar 16 03:53:11 GMT 2017


Hi,

I'm very shared to add a new dependency to build plugins. As it's well
explained in RedEdit, Python knowledgement will be required to maintain
source with C++ and Qt knowledgement. I'm not favorable to increase the
complexity. I work personalty to decrease the complexity since a while in
this project, where the code become huge for a limited ressource.

Best

Giles Caulier


2017-03-14 9:23 GMT+01:00 Himanshu Shekhar <himanshushekharb16 at gmail.com>:

> Hello
>
> I went through KIPI plugins and had some suggestions.
> Currently, KIPI Plugins are written in C++. It's great, fast, but a bit
> complex, compared to the alternative implementation in Python.
>
> How about reimplementing it in Python? It's easy, scalable.
>
> I had some thoughts to do the same:
> * Reimplement the plugins in Python (Python3).
>
> * As it is done currently, other applications using KIPI plugins can use
> the same API (in C++) to do the image upload/download task, where the C++
> helper would spawn some Python subprocess to do the entire task.
>
> * Use some sort of IPC, like File IO to get the response back to the
> calling program (if required). We can also consider "libpython" as a
> candidate. https://docs.python.org/3/extending/embedding.html
>
> Advantages:
> * Ease of maintenance, as APIs tend to change fast, and so your callbacks
> within the program.
> * The task is network bound, and not CPU intensive. So, Python is a good
> choice.
> * Python "requests" module is very reliable to handle HTTP requests.
> * Objectives can be achieved better with lesser lines of code.
> * This could also pave way for creating plugins for other online services
> and integrating with KDE (like GNOME online accounts).
>
> I tried to have a discussion on StackOverflow http://
> stackoverflow.com/questions/42611151/is-it-advisable-to-
> embed-python-in-a-c-application/42611603#42611603 and Reddit
> https://www.reddit.com/r/cpp/comments/5xnpvl/is_it_
> advisable_to_embed_python_in_a_c_application/ and got mixed reviews.
>
> I would like to have your review on the same.
> If you agree, I can work on some simple prototype by the weekend for a
> demo.
> --
>
> Regards
>
> Himanshu Shekhar
>
> https://github.com/himanshub16/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20170316/b754c4da/attachment.html>


More information about the Digikam-devel mailing list