<div dir="ltr"><div>Hi,</div><div><br></div>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.<div><br></div><div>Best</div><div><br></div><div>Giles Caulier</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-14 9:23 GMT+01:00 Himanshu Shekhar <span dir="ltr"><<a href="mailto:himanshushekharb16@gmail.com" target="_blank">himanshushekharb16@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">https://docs.<wbr>python.org/3/extending/<wbr>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" target="_blank">http://<wbr>stackoverflow.com/questions/<wbr>42611151/is-it-advisable-to-<wbr>embed-python-in-a-c-<wbr>application/42611603#42611603</a> <wbr>and Reddit <a href="https://www.reddit.com/r/cpp/comments/5xnpvl/is_it_advisable_to_embed_python_in_a_c_application/" target="_blank">https://www.reddit.com/<wbr>r/cpp/comments/5xnpvl/is_it_<wbr>advisable_to_embed_python_in_<wbr>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><span class="HOEnZb"><font color="#888888"><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/" target="_blank">https://github.com/<wbr>himanshub16/</a></p>
</div></div>
</font></span></blockquote></div><br></div>