(self, monitor)
Retrieve screen pixels for a given monitor.

        Note: *monitor* can be a tuple like the one PIL.Image.grab() accepts.

        :param monitor: The coordinates and size of the box to capture.
                        See :meth:`monitors <monitors>` for object details.
        :return :class:`ScreenShot <ScreenShot>`.
Retrieve screen pixels for a given monitor.
Retrieve screen pixels for a given monitor .
def grab(self, monitor):
        # type: (Monitor) -> ScreenShot
        """
        Retrieve screen pixels for a given monitor.

        Note: *monitor* can be a tuple like the one PIL.Image.grab() accepts.

        :param monitor: The coordinates and size of the box to capture.
                        See :meth:`monitors <monitors>` for object details.
        :return :class:`ScreenShot <ScreenShot>`.
        """

        # Convert PIL bbox style
        if isinstance(monitor, tuple):
            monitor = {
                "left": monitor[0],
                "top": monitor[1],
                "width": monitor[2] - monitor[0],
                "height": monitor[3] - monitor[1],
            }

        with lock:
            return self._grab_impl(monitor)
def grab ( self , monitor ) : # type: (Monitor) -> ScreenShot # Convert PIL bbox style if isinstance ( monitor , tuple ) : monitor = { "left" : monitor [ 0 ] , "top" : monitor [ 1 ] , "width" : monitor [ 2 ] - monitor [ 0 ] , "height" : monitor [ 3 ] - monitor [ 1 ] , } with lock : return self . _grab_impl ( monitor )