any portable way to print? (and i mean on a printer)

David Boddie david at boddie.org.uk
Wed Sep 6 09:53:17 EDT 2006


Steve Holden wrote:
> Liquid Snake wrote:
> > I think my question is clear.., is there any way to print any text on a
> > portable way?..., and actually, i don't know how to print at all.., just
> > give me some pointers, name a module, and i can investigate for myself..
> > sorry for my english, thanks in advance..
> > ps: i prefer a Standard Library module.

> No, there is no way to print any text (did yo also want to print
> graphics?) portably (by which I mean a way that will work on Windows,
> Linux, Solaris, HP-UX, AIX, ...).

Well, that's not quite true, Steve. Python bindings for various
cross-platform frameworks should manage this quite well, depending
on what the original poster meant by text. PyQt4, for example,
provides classes that let you print to native printers on Linux,
Mac OS X, Windows and various other Unix platforms:

  http://www.riverbankcomputing.co.uk/pyqt/

However, the original poster did specify a preference for a standard
library module, so your answer is probably correct within that
context. :-)

If the printer was a network printer, there might be some more options
to explore. I think there's potential for a pure Python solution to
this problem to be added to the desktop module:

  http://cheeseshop.python.org/pypi/desktop/

David




More information about the Python-list mailing list