Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 360
Hans Avatar asked Jan 08 '17 15:01

Hans


1 Answers

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.

like image 169
Luke Taylor Avatar answered Oct 23 '22 17:10

Luke Taylor