This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def render(digits): | |
'''This function converts its input, a string of decimal digits, into a | |
barcode, using the interleaved 2 of 5 format. The input string must not | |
contain an odd number of digits. The output is an SVG string. | |
Wikipedia [ITF Format]: http://en.wikipedia.org/wiki/Interleaved_2_of_5 | |
''' | |
top = '<svg height="58" width="{0}" style="background:white">' |
NewerOlder