Skip to content

Instantly share code, notes, and snippets.

@glyph
glyph / onlock.py
Created February 12, 2014 23:37
onlock.py
from __future__ import print_function
import os, sys, pipes
import objc
from Foundation import NSObject
from CoreFoundation import (
CFRunLoopRun, CFRunLoopStop, CFFileDescriptorCreate,
CFFileDescriptorCreateRunLoopSource, CFRunLoopAddSource,