Barcodes
Tim Chase
python.list at tim.thechases.com
Mon Aug 17 16:55:23 EDT 2009
>> My company needs a small inventory management app. Does
>> python have any libraries to help with reading and writing
>> bar codes?
>
> I've written bar code apps and python really doesn't enter
> into that part of things. Printers generally have bar code
> printing capabilities so you just send the right escape
> sequences and you get the bar codes. To read them, bar code
> readers scan and translate before sending the values through
> typically a keyboard wedge or serial port.
To add to what Emile mentions, most barcode readers present a
keyboard-wedge interface, so that scanning a barcode merely
appears as if you typed it at the keyboard (USB readers show up
as a HID profile). Often they'll have configuration barcodes
that you can scan to tweak the profile (such as pressing <enter>,
<tab> or an arrow-key after sending the barcode; controlling beep
tone & volume, etc).
For printing barcodes, you can use any number of solutions -- the
most popular usually just involves installing a "barcode font"
and then rendering text in that font to your desired output
canvas. I believe there are some native rendering solutions as
well, but I've not investigated since the font method was more
than sufficient for my wants.
-tkc
More information about the Python-list
mailing list