python:barcode
This is an old revision of the document!
Table of Contents
Python Barcode
huBarcode
Setup huBarcode
- step1: download hubarcode from https://github.com/hudora/huBarcode
- step2: install python processing image:
pip uninstall PIL pip install pillow
- step2: build and install hubarcode:
python setup.py build python setup.py install
Example create Barcode with hubarcode
Create Firt example barcode.py and run it:
- Step1: Create barcode.py
import sys from hubarcode.code128 import Code128Encoder if __name__ == '__main__': print 'barcode generator' encoder = Code128Encoder(sys.argv[1]) encoder.save("test.png")
- Step2: Run it:
python barcode.py 123
Not run:
barcode.py 123
Because it generate error:
ImportError: No module named Image
python/barcode.1470612529.txt.gz · Last modified: 2022/10/29 16:15 (external edit)