Integrating Python (PiCxx)


#1

A few months ago I started looking at embedding Python in JUCE.

Eventually I narrowed the candidates down to boost::python and PyCXX.

I didn't want to introduce a boost dependency, and I found PyCXX impenetrable, so I ended up rewriting it.

I've now finished my rewrite and put it up on GitHub: https://github.com/p-i-/PiCxx -- it was very difficult and really stretched me, taking several months.

I'm not so sure on the next step.  It would be possible to wrap every JUCE class exposing it to Python. Then one could code entirely in Python.

Of course for performance critical code, the best approach would probably be to make custom Python extension classes using C++.

I don't know JUCE too well; I have looked through much of the demo, but several months ago. So at time of writing I don't know how much of a mission this is going to be, or even what direction to take this in.

I was mainly planning on just writing my game logic in Python and using JUCE/C++ to provide the engine, and I may stick with that.

But if anyone is interested in talking about integrating Python into JUCE, please post!

(or find me on the IRC channel: #juce on freenode)

π


#2

I had a quick look through the GitHub readme. Looks great. I was interesting in JUCE + Python a while ago. One concern would be that it would inflate the runtime size. However I think it could open up a lot of possibilities. 

Thanks for your work on this. 

 

 


#3

Yes the Python runtime is about 20 megs. Also I don't think Python3 is building reliably on mobile devices yet.