#!/usr/bin/env python # -*- coding: utf-8 -*- import barcode from barcode.writer import ImageWriter EAN = barcode.get_barcode_class('ean13') ean = EAN(u'123456789011', writer=ImageWriter()) fullname = ean.save('my_ean13_barcode')