how to print to printer ?
Chris Liechti
cliechti at gmx.net
Fri Apr 12 21:52:42 EDT 2002
Uwe Schmitt <uwe at rocksport.de> wrote in news:a980jr$9d07k$1 at hades.rz.uni-
sb.de:
> Christopher Browne <cbbrowne at acm.org> wrote:
>| Uwe Schmitt <uwe at rocksport.de> wrote:
>|> I'd like to send "raw" data to a printer, how can I do this,
>|> using Python ???
>
>| It's terribly platform dependent.
>
> oops. i forgot to tell you that I'm using windows...
> and i really want to print "raw" data and not pdf et al...
never used that module, but it could fit for you problem :-)
"""
win32print.WritePrinter
int = WritePrinter( hprinter, buf )
Copies the specified bytes to the specified printer. Suitable for copying
raw Postscript or HPGL files to a printer. StartDocPrinter and
EndDocPrinter should be called before and after. Returns number of bytes
written to printer.
"""
that module is part of "win32all". the module has of course all the
functions to open a printer etc.
chris
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list