Is there a library yet that supports using the touchbar in python? Any bindings, or a way to for example call some C
functions that alter things on the touchbar?
Asked
Active
Viewed 3,469 times
7

Vadim Kotov
- 8,084
- 8
- 48
- 62

Hans
- 2,354
- 3
- 25
- 35
1 Answers
5
Take a look at PyObjC. It provides methods for calling Objective-C functions from Python. It's a great way to play with macOS APIs from Python.
From the website:
The PyObjC project aims to provide a bridge between the Python and Objective-C programming languages.
The website also states the important detail that
The most important usage of this is writing Cocoa GUI applications on Mac OS X in pure Python. See our tutorial for an example of this.
which would indicate that you'd be able to build a touch bar interface using PyObjC.

Luke Taylor
- 8,631
- 8
- 54
- 92
-
For anyone interested, it looks as if the website has moved to https://pyobjc.readthedocs.io/en/latest/core/intro.html – laxer Apr 16 '19 at 17:37