Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
>>> from pyobjus import autoclass
>>> from pyobjus.dylib_manager import load_framework, INCLUDE
>>> load_framework(INCLUDE.AppKit)
>>> nscreen = autoclass('NSScreen')
>>> screen_count = int(nscreen.screens().count())
>>> for scr in range(screen_count):
... screen = nscreen.screens().objectAtIndex_(0)
... print screen.frame.size.width, screen.frame.size.height
...
1680.0 1050.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.