Python listens for MacOS global events : Python listens for MacOS global events

from AppKit import *
from PyObjCTools import AppHelper
import CoreFoundation

def handler(event):
    NSLog(event)
    print(event)


NSEvent.addGlobalMonitorForEventsMatchingMask_handler_(NSLeftMouseDownMask, handler)
AppHelper.runConsoleEventLoop()

But, this just runs forever, does not respond to mouse events, what's wrong with that?