Tkinter without the window

Jeff Shannon jeff at ccvcorp.com
Wed Nov 21 19:08:14 EST 2001


Les Smithson wrote:

> I have a working Tkinter application that uses a canvas to draw
> graphics in an X window. Is it possible for Tkinter to draw the same
> graphics straight to a PNG/JPG/whatever file without going through a
> windowing system?
>
> I have in mind using this application for an External script in a Zope
> server. This would be called to generate a img tag on the fly. I want
> to do this in the server, rather then in the browser. Any ideas how I
> can generate PNG/JPG directly from Python, other than Tkinter?

You probably ought to look at the Python Imaging Library--

http://www.pythonware.com/products/pil/index.htm

It can rotate, transform, crop, filter, and generate images on the fly,
and save them in any standard graphics format.

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list