[Python-3000] PyGUI in Py3K stdlib, more details

Bill Janssen janssen at parc.com
Mon May 1 20:58:19 CEST 2006


>    Does it support printing? wxPython/wxWidgets support cross-platform
> low-level (pixel by pixel) printing, preview with zoom...

It's currently got the low-level idea of an offscreen Pixmap into
which the app can draw by calling "with_canvas".  The Pixmap captures
an image of the drawing, and you can then use it to draw on other
surfaces.  I think one way to go would be to add PDFCanvas (a subclass
of Canvas which draws into a PDF stream), and then PDF, which would be
similar to Pixmap, in that it would have a "with_canvas" method which
would capture the drawing in PDF form.  The PDF class would also have
a method to save it to a file.

Actually, creating these two classes could be done right now; they're
independent of the platform.  Or I suppose you could do Print and
PrintCanvas classes, which would be bound to platform-specific
printing streams.  But that seems overkill to me.

Or Postscript, or SVG.  Whatever's good.  SVG would be an interesting
choice.

Hmmm, lots of ideas here...

Bill


More information about the Python-3000 mailing list