[wxPython] Any way to stuff characters to keyboard buffer?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Any way to stuff characters to keyboard buffer?

lec-4
Does anyone know of a way to stuff characters to the keyboard buffer?

I "inherited" a few serial port barcode scanners and I need read from
the serial port and then stuff them to the keyboard buffer.

The following code illustrates what I way trying to do:

p = open('/dev/ttyS0', 'r')      # serial port
t = open('/dev/tty0', 'w')       # console

while 1:
    x = p.readline()
    print x   # yes, I could read from /dev/ttyS0
    t.write(x)  # but this has no effect on console


I think writing to /dev/tty0 is probably the wrong method but I'm out of
ideas.


Please help.




_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users