[Pyobjc-dev] Embedding python in coca app - use pyobjc to convert between python/objc?
Brought to you by:
ronaldoussoren
|
From: Amos L. <am...@la...> - 2008-03-13 03:19:22
|
Hi, I'm new to pyobjc and cocoa. I'm trying to embed python in a cocoa application. It's working fine, but it seems like a lot of work to convert objc types to python before calling python functions, and then convert the resulting python objects to objc objects. I suspect that there may be a way to use pyobjc to do this kind of conversion for me more easily and/or more correctly. I've looked at the pyobjc examples but none of them seem to be written from the point of view of someone embedding python in an objc application. My suspicions are that I should figure out how to create a bundle written in python, and then load that bundle in my cocoa app and call the functions it defines, with pyobjc taking care of the python/objc conversions of arguments and return values. I'd appreciate any suggestions or examples of the best ways to embed python in cocoa apps. Thanks! -Amos |