PDA

View Full Version : How to use zbar with python in OS X?




ern
Aug 11, 2013, 04:11 AM
I'm trying to use my macbook iSight camera as a barcode scanner. And I'm using Python to build my application. I found that zbar is a open source library. It has iOS SDK and Linux editions but no OS X edition. I wonder which one should I use in OS X? I don't know much of Objective-C.
Thanks for your help in advance.



wrldwzrd89
Aug 11, 2013, 09:29 AM
Hello! You're referring to the zbar here (http://zbar.sourceforge.net/), right? You should definitely start from the Linux version, which has a variety of required and optional dependencies you'll have to deal with. Got Xcode? You'll need to install the command-line tools for it to compile zbar and its dependencies from source code.

ern
Aug 12, 2013, 06:44 PM
Thanks. I installed through homebrew. It works OK now. But I cannot find any resource in Python. Maybe I should use Objective-C?

wrldwzrd89
Aug 13, 2013, 04:38 AM
Thanks. I installed through homebrew. It works OK now. But I cannot find any resource in Python. Maybe I should use Objective-C?
zbar does have a Python binding. Are you trying to use Python 3? That may be the source of your difficulty; zbar's Python interface only works with Python 2.

ern
Aug 13, 2013, 09:28 AM
zbar does have a Python binding. Are you trying to use Python 3? That may be the source of your difficulty; zbar's Python interface only works with Python 2.

No, I'm using Python 2.7
I mean I can't google open source code using Python with iSight. So should I change to Objective-C?

wrldwzrd89
Aug 13, 2013, 04:03 PM
No, I'm using Python 2.7
I mean I can't google open source code using Python with iSight. So should I change to Objective-C?
Huh. Here I can't help.