How do I import Zbar into my Python 3.4 script?
Question: I am pretty new to programming, and have never used Zbar before. I am trying
to write a simple script that will allow me to import Zbar and use it to
decode a barcode image. I already have a script set up to decode text from
images that uses Pytesseract and Tesseract OCR, but I need to be able to
decode barcodes as well. I have Windows 7 32 bit, and and am using Python 3.4.
I have already installed Zbar and have used it from the command line
successfully to decode their barcode sample. I have tried using >pip install
zbar, but I keep getting the error:

"fatal error C1083: Cannot open include file: 'zbar.h': No such file or
directory error: command 'C:\Program Files\Microsoft Visual Studio
10.0\VC\BIN\cl.exe' failed with exit status 2"

Getting the pytesseract OCR was painless but I have wasted a lot of time on
this barcode portion of it, any help or alternatives would be much
appreciated.


Answer: Forget wrestling with all of the wrappers. The easiest solution for me was to
simply use

> import os
>
> os.system(r'D:\Winapps\Zbar\bin\zbarimg.exe -d d:\Winapps\Zbar\Examples
> \barcode.png')

Worked instantly. Hope this helps anyone else struggling with that issue.

