[Tutor] saving Tkinter canvas as jpg

Benjamin Fishbein bfishbein79 at gmail.com
Mon Dec 9 02:10:16 CET 2013


> Have you imported PIL ?  Show a small coding example here with the traceback. Cut and paste the traceback, don't paraphrase it.

Here's what printed out:

Traceback (most recent call last):
  File "<pyshell#65>", line 1, in <module>
    from PIL import ImageGrab
  File "/Library/Python/2.7/site-packages/PIL/ImageGrab.py", line 34, in <module>
    import _grabscreen
ImportError: No module named _grabscreen

From what I've seen online, this isn't available for mac...of course everything about this module is several years old, and it hasn't been updated with a new version in a few years, so I think there must be something better than it.


> I'm writing a program to draw pictures. I'm using Python 2.7.3 on Mac OSx. I'm trying to find a good way to save the canvas as a jpg (or other pic formats). The advice I've found on stackoverflow is ImageGrab from PIL, but apparently that doesn't work for macs. I get the "no module named _grabscreen" ImportError.
> Can you recommend a good module for saving the canvas into a picture file?
> Thank you,
> Ben
> 
> -- 
> Joel Goldstick
> http://joelgoldstick.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131208/0d12fe83/attachment-0001.html>


More information about the Tutor mailing list