Send commads to printer

free free ywantmore at hotmail.com
Tue Mar 16 06:51:39 EST 2004


Hi,

i'am writing a python program and now i need to print some stuff. Before 
print i want to set the text to condensed text and to italic, so i have to 
send some esc commads to printer.

my code

pp=open("/dev/lpr","w")
pp.write(chr(27)+chr(15))
pp.write("This should be condensed\n")
pp.write(chr(27)+chr(52))
pp.write("This should be italic too\n\f")
pp.close()

what i get is text in normal font. I think chr(27) does not send the ESC 
char to printer.
Does anyone knows who to do this ?????????'

Thanks in advance for your help

_________________________________________________________________
Fast. Reliable. Get MSN 9 Dial-up - 3 months for the price of 1! 
(Limited-time Offer) http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/





More information about the Python-list mailing list