This repository was archived by the owner on Jan 3, 2018. It is now read-only.

Description
Too bad huBarcode doesn't work with Python3.
I'd submit a patch, but I'm pretty new to libraries and git too so... here is what I did to make huBarcode work for python3 (or... at least the parts I need to generate a datamatrix):
- Example from "hubarcode/datamatrix/init.py":
from textencoder import TextEncoder
Must be replaced by this:
from .textencoder import TextEncoder
This is only an example. Almost every .py-File needs to be update
- Example from "hubarcode/datamatrix/placement.py", line 105:
def place_standard_shape(self, (posx, posy), codeword):
Must be replaced with:
def place_standard_shape(self, posx_posy, codeword):
posx, posy = posx_posy
- "hubarcode/datamatrix/renderer.py", the StringIO has been restructured. To Import it in a Python2 and Python3 compatible way use:
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
- Last but not least, remember to install Pillow instead of PIL as PIL isn't Python3 compatible either.