开发者

Google app engine QR code decoder

开发者 https://www.devze.com 2023-01-13 13:31 出处:网络
I was wondering if there is a good library for python for decoding QR code. Basically what I would like is to give library开发者_C百科 image with QR code on it and the library would output contents sa

I was wondering if there is a good library for python for decoding QR code. Basically what I would like is to give library开发者_C百科 image with QR code on it and the library would output contents saved in image.


Have you already looked at : http://pyqrcode.sourceforge.net/

If code compiling does not work for you, then there is also pure python implementation at : http://github.com/hcvst/pyqr


If you're still looking for something to do this a year later, you should check the ZBar project at http://zbar.sourceforge.net/. It looks like it started out for 1-D barcodes but has been expanded to include QR. It's implemented in C, LGPL licensed, and in addition to source has binaries for Linux, Windows and iPhone. Bindings available for Python, Perl, Ruby.

As of August 17, 2011 the core image processing portion of ZBar hasn't been updated since 2009 but there is recent activity on the iPhone development part of the project, which I'll interpret as the core being stable. There's also some activity in the SourceForge forums for the project.

It's also possible that pyxing (https://github.com/holizz/pyxing) would work but all that's there is an initial checkin of the port, so it's up to the (possible) user to check it.


I've looked before with no success. Two problems are that native c code can't be compiled and you can't get access to the file system.

pyqrcode didn't work out and neither did zxing.


Try qrtools , It has a nice enough interface

from qrtools import QR
myCode = QR(filename=u"/home/psutton/Documents/Python/qrcodes/qrcode.png")
if myCode.decode():
  print myCode.data
  print myCode.data_type

Output

123456
text
0

精彩评论

暂无评论...
验证码 换一张
取 消