This is excellent. Thankyou!
Posts made by snaggled
Python Objective-C Bridge
First of all, great product!
I'm pretty sure I can call back into Objective-C by writing a statically compiled python library with the functions I want in it (I can see examples of this in places like scene.py and canvas.py (e.g. import _canvas)). BTW, an example would be great, since those libs are compiled into the libpythonista.a lib I can't see what they look like, but I can probably figure it out.
My question is - is the reverse possible ? I want to call a python function from Objective-C. In the PyObjC world I would have imported objc and then created a python subclass of a NSObject. I was hoping you could provide any pointers on how I would go about this.
Also, how would global variables work ? If I were to call a python function and it declared a globalvariable then returned and then I was to call another function that used the same global variable, would it be available ? Would python keep its memory space around between calls ?
Any info you have would be much appreciated.