On 25 September 2017 at 22:29, Christophe Sadoine <[email protected]> wrote:
> On 21 September 2017 at 18:00, Davide Andreoli <[email protected]> wrote:
>> 2017-09-21 9:09 GMT+02:00 Christophe Sadoine <[email protected]>:
>>
>>> Hello,
>>>
>>> As the title says, I have a c application and I would like to let the
>>> user extend it with plugins.
>>> I can do it in c of course, but I wonder if I can also do it with python?
>>>
>>> So what I need first, is a way to pass an Evas/Efl Object Pointer to
>>> the python api,
>>> And then it would be nice to be able to manipulate in c the objects we
>>> created in the bindings.
>>>
>>> Has this been done or is it easily doable?
>>>
>>
>> yes, it's doable using python-efl. And it is used in edgar (an E module that
>> load python gadgets). You can see the source at:
>> https://git.enlightenment.org/enlightenment/modules/edgar.git/tree/src/e_mod_edgar.c
>>
>> In that source file you should find everything is needed to load python
>> modules from C
>> (your plugins) and to export some C functions to PY (your plugins API)
>
> Thank you!
> I was able to make a small working sample out of it.
> But like edgar I had to copy the file efl.eo_api.h.
> I think this file should be installed with python-efl and accessible
> with pkg-config.
> Also when using object_from_instance for an elementary object you must
> import elementary. if it is an edje object, import edje, etc.
> if not it return 0. Maybe it would be nice to have some error message?

I opened the following 2 tasks:
https://phab.enlightenment.org/T6244
https://phab.enlightenment.org/T6245

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to