PIL Question

nirinA raseliarison nirina.raseliarison at gmail.com
Mon May 2 03:48:54 EDT 2011


[PyNewbie]

> Question: I can't seem to find the captured image, where does it go?

for me, it just goes to the current working directory:

   $ python -i
   Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit  
(Intel)] on win32
   Type "help", "copyright", "credits" or "license" for more information.
   >>> from PIL import ImageGrab
   >>> ImageGrab.grab().save("screen_capture.jpg", "JPEG")
   >>> import os
   >>> os.listdir(os.getcwd())
   ['.appcfg_cookies', '.appcfg_nag', '.bash_history', '.idlerc',  
'.inputrc', '.povray',
   'bootex.log', 'buildBasicDemo.txt', 'glsample.cpp', 'glsample.o',  
'log.txt',
   'screen_capture.jpg', 'test.c']
   >>>

-- 
nirinA



More information about the Python-list mailing list