Yep, that’s it. Just for posterity here’s the successful proof of concept.
import objc
from Foundation import NSLog, NSRunLoop
CRApplication = objc.lookUpClass("CRApplication")
objc.registerMetaDataForSelector(
b'CRRouter',
b'get:block:',
{
'arguments': {
> On 9 Jan 2020, at 00:23, Rand Dvorak wrote:
>
> I got it working. Basically I have a main.py file in Resources that get
> loaded and run by PyRun_SimpleFile in applicationDidFinishLaunching. Control
> is then passed to the python interpreter. Notice the infinite loop at the
> bottom whic