Re: pyserial - escape codes transportation

2009-12-11 Thread ObservantP
On Dec 11, 7:58 pm, Grant Edwards  wrote:
> On 2009-12-11, Grant Edwards  wrote:
>
> > On 2009-12-11, ObservantP  wrote:
> >> need help. newbie. pyserial and dot matrix printer. issue-
> >> escape codes arrive at printer ( verified from hex dump) but
> >> do not get applied.
>
> > What you're saying is your printer isn't working correctly.
>
> BTW, I (among others) filter out all posts made from google
> groups. I only stumbled across your posting by accident while
> playing with my newsreader configuration.  I won't see any
> follow-up postings you make if they're from google groups.
>
> --
> Grant Edwards                   grante             Yow! !  Everybody out of
>                                   at               the GENETIC POOL!
>                                visi.com            

Hi Grant

Thanks for the tip.

Had used the hex version alright.

Looking again at the code, one realizes the difference between 'W' and
'w'...

Sorted. All is well. Delighted to get this resolved.

John


-- 
http://mail.python.org/mailman/listinfo/python-list


pyserial - escape codes transportation

2009-12-12 Thread ObservantP
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