I have little experience with programming. I have Python installed on a Windows XP system. What code do I need to use to send output from a Python script to a local printer attached to my workstation? to a network printer?
The win32print module (in Matt Hammond's windows modules) may help. eg:
pid = win32print.OpenPrinter(win32print.GetDefaultPrinter())
win32print.StartDocPrinter(pid, 1, ('My print job', None, 'raw'))
win32print.WritePrinter(pid, s)
win32print.EndDocPrinter(pid)
win32print.ClosePrinter(pid)When I did this, I was printing to a postscript printer, and I wasn't printing anything that required complex layout. So I generated the postscript code myself, and then just sent it straight to the printer...
-- John. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
