Screenshots in Mac OS X

Metallicow metaliobovinus at gmail.com
Thu Oct 24 00:00:51 EDT 2013


Well, I'm not going to post my whole module as I get little testing on mac, but I will let you in on a little secret:

Use a GUI, such as wxPython or QT or other, then create a basic fullscreen frame that is invisible and copy its DC to the clipboard. Not exactly a hack(might be edgy), but it works. Writing the gui/logic code will be up to you.

here is a basic wx example

f = wxFrame(None, -1)
f.Show(True)
f.SetTransparent(0)
# Bind your hotkeys to capture the screen.

Also, not sure ATM... but I recall someone wrote a cross platform screenshot implementation IIRC that replaces PIL's ImageGrab module, I think it is pyscreenshot or something similar. You might want to look into that.



More information about the Python-list mailing list