Keyboard input magnetic stripe reader and wxPython

Brian bptonner at yahoo.com
Sun May 2 17:53:44 EDT 2004


This probably has a simple answer:
I need to capture data from a magnetic stripe reader, which is fed
through the keyboard port. I want to use wxPython for the application
(under Windows). I can read this data in a text control, but only if
the text control has the focus.

Ideally, I'd use a text control that could be made invisible, and that
could be forced to have the focus programmatically. That way I could
use the other text control methods, and not have to write these
methods from scratch.

In other words, does a method exist in wxPython that will let me catch
keyboard characters 'on demand' and store them in a string buffer?

If you're curious, the application is a museum kiosk, where visitors
will be able to swipe their credit cards, driver's licenses, etc., and
see what information is stored there. I'd like to build this from as
many high-level objects as possible.

Thanks,
Brian



More information about the Python-list mailing list