Screenshots

Fredrik Lundh fredrik at pythonware.com
Fri Jun 6 09:34:49 CEST 2003


"Sam" <stardif10 at hotmail.com> wrote:

> I am looking for a way to take screenshots of the desktop. The files
> don't need to be opened or viewed, just saved with a filename the user
> gives. I'm developing this in a Windows environment. If you could give
> me any links or hints about this I would be most appreciative.

using PIL 1.1.3 or later:

    import ImageGrab
    ImageGrab.grab().save(filename)

for more info on PIL, see:

    http://www.pythonware.com/products/pil (info, downloads, docs)
    http://effbot.org/zone/pil-index.htm (current doc drafts)
    http://effbot.org/zone/pil-imagegrab.htm (imagegrab doc draft)

</F>








More information about the Python-list mailing list