def take_screenshot(self, bounds=None):
    '''
    NOTE:
      REQUIRES: PYTHON IMAGE LIBRARY

    Takes a snapshot of desktop and loads it into memory as a PIL object.

    TODO:
      * Add multimonitor support

    '''

    try:
      from PIL import Image
    except __HOLE__ as e:
      print(e)
      print("Need to have PIL installed! See: effbot.org for download")
      sys.exit()

    return self._make_image_from_buffer(self._get_screen_buffer(bounds))
dataset/ETHPy150Open chriskiehl/pyrobot/pyrobot.py/Robot.take_screenshot