I understand the concept of PyObjC, but can nowhere find any information on what exactly it is or how to get started with it.
Is it like a converter, where youinput python files and get an objective c one? Or is it a library you can import to your objective c files which let's you write python in them?
Or is it something else entirely?
If anyone can give tips on how to approach it, an outline of how it works, or just some instructions on a hello world with it, I would be very grateful.
PyObjC is a bridge between Python and Objective-C. It allows Python scripts to use and extend existing Objective-C class libraries; most importantly the Cocoa libraries by Apple.
PyObjC is a bridge between Python and Objective-C. It allows full featured Cocoa applications to be written in pure Python. It is also easy to use other frameworks containing Objective-C class libraries from Python and to mix in Objective-C, C and C++ source.
Installation. PyObjC is distributed as a collection of Python packages and can be installed using pip. Manual installation is also supported, but is a lot more work and is therefore more of a power-user feature.
It's a language binding, meaning it allows you to call ObjC code from Python and vice versa. You write wrapper modules in ObjC that can be linked into the Python interpreter (which is written in C) to give it access to ObjC functions (tutorial for this use case). Apparently, the entire Cocoa framework is already wrapped, so you can use that from Python with ease.
Vice versa, it enables you to link the Python interpreter into your ObjC app and use it to execute Python code in your app (tutorial).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With