<div dir="ltr">Hello<div><br><div>I went through KIPI plugins and had some suggestions.</div></div><div>Currently, KIPI Plugins are written in C++. It's great, fast, but a bit complex, compared to the alternative implementation in Python.</div><div><br></div><div>How about reimplementing it in Python? It's easy, scalable.</div><div><br></div><div>I had some thoughts to do the same:</div><div>* Reimplement the plugins in Python (Python3).</div><div><br></div><div>* 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.</div><div><br></div><div>* 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. <a href="https://docs.python.org/3/extending/embedding.html">https://docs.python.org/3/extending/embedding.html</a> </div><div><br></div><div>Advantages:</div><div>* Ease of maintenance, as APIs tend to change fast, and so your callbacks within the program.</div><div>* The task is network bound, and not CPU intensive. So, Python is a good choice.</div><div>* Python "requests" module is very reliable to handle HTTP requests.</div><div>* Objectives can be achieved better with lesser lines of code.</div><div>* This could also pave way for creating plugins for other online services and integrating with KDE (like GNOME online accounts).</div><div><br></div><div>I tried to have a discussion on StackOverflow <a href="http://stackoverflow.com/questions/42611151/is-it-advisable-to-embed-python-in-a-c-application/42611603#42611603">http://stackoverflow.com/questions/42611151/is-it-advisable-to-embed-python-in-a-c-application/42611603#42611603</a> and Reddit <a href="https://www.reddit.com/r/cpp/comments/5xnpvl/is_it_advisable_to_embed_python_in_a_c_application/">https://www.reddit.com/r/cpp/comments/5xnpvl/is_it_advisable_to_embed_python_in_a_c_application/</a> and got mixed reviews.</div><div><br></div><div>I would like to have your review on the same. </div><div>If you agree, I can work on some simple prototype by the weekend for a demo.</div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">Regards <br></p><p dir="ltr">
Himanshu Shekhar</p><p><a href="https://github.com/himanshub16/">https://github.com/himanshub16/</a></p>
</div></div>