Reputation: 15588
I have created an objective-C framework that I would like to import and access through a python script. I understand how to import this stuff in Python, but what do i need to do on the obj-c side to make that framework importable?
Thanks
Upvotes: 4
Views: 581
Reputation: 64002
You'll want to use PyObjC, as Chuck said. Specifically, I'd suggest getting the source, which contains a collection of scripts, pyobjc-metadata (here's the readme), that doesn't seem to be included in the default Apple installation, for wrapping a framework, generating the metadata the Python side needs, and so forth.
Upvotes: 6
Reputation: 237060
You can just use PyObjC, which is included in Mac OS X 10.5 and later.
Upvotes: 5
Reputation: 56390
I'm not sure if this particular combination works, but you might be able to use SWIG to create a Python module out of your Objective-C which can then be imported into Python.
Upvotes: 2