Re: [Vala] Embed Python into Vala, extend Vala with Python

On Tue, Sep 1, 2009 at 10:40 AM, Jan Hudec<bulb ucw cz> wrote:

You would need a .vapi for the python library. There is none in the vala
distribution, so search the web whether somebody already did anything in that
direction, otherwise you'd have to write it.

I found this, I just tried to ask for more details there:

The API is bigger, so it would be more work than Lua, but for the start you
don't need everything -- just the functions to load code, execute it and
control the execution.

However, it might be better to go the other way around. Implement your code
in vala as library, bind it to python and call it from there. I believe there
is experimental implementation of gobject-introspection for python. As far as
it works, any vala code should be just callable from python including ability
to bind python callbacks to signals with no extra effort (just ask valac to
generate the .gir and compile it to typelib with g-ir-compiler). As far as it
does not (I didn't try it and it's supposed to be experimental), python-glib
has some reasonable tooling to do the binding.

Hmm, have to think about this.... Thanks!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]