How to use zbar with python in OS X?

Discussion in 'Mac Programming' started by ern, Aug 11, 2013.

  1. ern
    macrumors newbie

    Joined:
    Jul 23, 2011
    #1
    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.
     
  2. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Hello! You're referring to the zbar here, 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.
     
  3. ern
    thread starter macrumors newbie

    Joined:
    Jul 23, 2011
    #3
    Thanks. I installed through homebrew. It works OK now. But I cannot find any resource in Python. Maybe I should use Objective-C?
     
  4. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #4
    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.
     
  5. ern
    thread starter macrumors newbie

    Joined:
    Jul 23, 2011
    #5
    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?
     
  6. macrumors G4

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #6
    Huh. Here I can't help.
     

Share This Page