Hans
Hans

Reputation: 2492

Touchbar support in python

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?

Upvotes: 7

Views: 3596

Answers (1)

Luke Taylor
Luke Taylor

Reputation: 9561

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.

Upvotes: 5

Related Questions