16 lines
387 B
Python
16 lines
387 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
# https://stackoverflow.com/questions/57427243/how-to-generate-barcode-in-python-3-7
|
|
|
|
import barcode
|
|
from barcode.writer import ImageWriter
|
|
|
|
def testEan():
|
|
EAN = barcode.get_barcode_class('ean13')
|
|
ean = EAN(u'123456789011', writer=ImageWriter())
|
|
fullname = ean.save('my_ean13_barcode')
|
|
|
|
if __name__ == '__main__':
|
|
testEan()
|
|
|