Access Objective-C classes from Python
Python Objective-C Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
examples Merge pull request #12 from trivedigaurav/patch-3 Nov 8, 2016
objc_classes
pyobjus
tests
tools
.gitignore
LICENSE
Makefile
README.md
setup.py

README.md

Pyobjus

Python module for accessing Objective-C classes as Python classes using Objective-C runtime reflection.

(Work in progress.)

Quick overview

from pyobjus import autoclass, objc_str
from pyobjus.dylib_manager import load_framework, INCLUDE

# load AppKit framework into pyojbus
load_framework(INCLUDE.AppKit)

# get nsalert class
NSAlert = autoclass('NSAlert')

# create an NSAlert object, and show it.
alert = NSAlert.alloc().init()
alert.setMessageText_(objc_str('Hello world!'))
alert.runModal()

Support

If you need assistance, you can ask for help on our mailing list:

We also have an IRC channel:

  • Server : irc.freenode.net
  • Port : 6667, 6697 (SSL only)
  • Channel : #kivy

Contributing

We love pull requests and discussing novel ideas. Check out our contribution guide and feel free to improve Pyobjus.

The following mailing list and IRC channel are used exclusively for discussions about developing the Kivy framework and its sister projects:

IRC channel:

  • Server : irc.freenode.net
  • Port : 6667, 6697 (SSL only)
  • Channel : #kivy-dev

License

Pyobjus is released under the terms of the MIT License. Please refer to the LICENSE file.