Platform
Windows 7 x86
Prepare
Download python package management tool, and install PIL with pip.
wget.exe https://bootstrap.pypa.io/get-pip.py
C:\Python27\python.exe get-pip.py
Install VCForPython27, and the package will be used during PIL cimpile. Download PIL package, compile PIL and Install it on localhost.
C:\Python27\Scripts\pip.exe install PIL --allow-external PIL --allow-unverified PIL
Screenshot desktop.
PS C:\Users\nfs> C:\Python27\python.exe
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import ImageGrab
>>> im = ImageGrab.grab()
>>> im.save("C:/Users/nfs/Desktop/screenshot.png")
>>> im.close()