https://pyobjc.readthedocs.io/en/latest/examples/core/Scripts/stdinreader/index.html
Scripts/stdinreader - PyObjC - the Python to Objective-C bridge
Download Example This script demonstrates how to use a Cocoa event loop to asynchronously read from an existing file descriptor. Sources: stdinreader.py
the pythonobjective cscriptspyobjcbridge