datamatrix is a 2d barcode format. I require an implementation (or port of existing library) to encode urls (meaning lowercase letters, numbers and [.-/: ] in datamatrix barcodes. The implementation must be in pure Python. There is already an OpenSource C-Language version of datamatrix generation called libdmtx and Python bindings to that C library called pydmtx but datamatrix generation without additional C code is needed by me. Since libdmtx is OpenSource and the results of your work will be also open sourced, you may feel free to directly port the datamatrix generation code in libdmtx over from C to Python. Your Code needs to generate the final images via PIL, the Python imaging library. Decoding of datamatrix barcodes is not part of this project. Further introduction in what datamatrix is can be found at [login to view URL] [login to view URL] (This links are purly informational and not part of the contract).
## Deliverables
1. Complete source code for a datamatrix generation library in Python which is able to encode arbitrary data into datamatrix barcodes.
2. Sample program using the library and using the Python Imaging Library (PIL) to write the image to disk. Along the lines of:
from thisproject import DataMatrix
dm = DataMatrix( "hello world" )
[login to view URL]( '[login to view URL]', 'png' )
3. Sample barcodes encoding the strings "wer das liest ist 31337" and "[login to view URL]" as an PNG image. Barcodes generated by your library will be tested against the (phone based) decoders from [login to view URL] and against dmtxread from libdmtx.
All code submitted must come with unittests and be rated by pylint with a score of 8 or better.
## Platform
The result should be portable Python code for Python 2.4 and Python 2.5. It will be tested on MacOS X 10.4 and FreeBSD 5/6.