need help. newbie. pyserial and dot matrix printer. issue- escape codes arrive at printer ( verified from hex dump) but do not get applied. printer make/model STAR POS printer SP500. oddly, printer commands not initiated with the escape code .i.e. a symbol, work fine.
import serial ser=serial.Serial(0) ser.bytesize=7 ser.timeout=1 ser.dsrdtr=1 ser.write('PySerial'+'\n') ser.write('Star SP500'+'\n') #Double Width On 14 SO = Or ESC W 1 / 0 # Off 20 DC4= ser.write('' +'Double Width-Symbol\n') #Good ser.write('' +'Reset\n') #Good ser.write('\n') #Good ser.write('Xw1\n'+'Double Width-ESC\n') #Nope ( Nor CHR(027) '\x1b' ser.write('Xw0\n'+'Reset\n') #X is symbol not showing up here. ser.write('\n') ser.write('\n') ser.write('\n') ser.close() -- http://mail.python.org/mailman/listinfo/python-list