[Tutor] dynamic printing
dman
dsh8290@rit.edu
Thu, 17 Jan 2002 14:11:06 -0500
| Is there a module that allows one to print to a PRINTER
| instead of the screen? I can save it to a file and then go
| back with windows and hit File>Print..
If you're using a Unix system, you could go straight to the printer
with
printer = open( "/dev/lp0" , "a" )
printer.write( "some text that will spit out of the printer" )
printer.close()
better than doing that is to use the print spooler on the system
import os
printer = os.popen( "lp" )
printer.write( "some text to send to the printer" )
printer.write( " in the proper format and when it is ready!!" )
printer.close()
On Windows, uhh, who knows. Devices aren't accessed as files there.
-D
--
Religion that God our Father accepts as pure and faultless is this: to
look after orphans and widows in their distress and to keep oneself from
being polluted by the world.
James 1:27