[Tutor] Print Screen

Luke Paireepinart rabidpoobear at gmail.com
Thu Nov 2 23:23:44 CET 2006


Chris Hengge wrote:
> Because I dont know any other way to capture the screen? (In my mind 
> using print screen would be universal) =P
The print screen button doesn't do anything.
It generates a keycode just like any other button on the keyboard.
Windows captures this keypress and interprets it as you wanting a 
screenshot.
There is no inherent operation tied to this specific button that creates 
a screenshot.
So yeah, you could probably go the route of generating a printscreen 
keypress, but
there are much easier ways to do that.
For example,
Install PIL,
then do
 >>> import ImageGrab
 >>> ImageGrab.grab().save('temp.jpg')
That's all there is to it.


More information about the Tutor mailing list