Skip to content

Commit 9085bb0

Browse files
authored
Add files via upload
make a barcode using barcode library in python Language
1 parent 46c484d commit 9085bb0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

barcodegenerator.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# pip install python_barcode
2+
from barcode.ean import EAN13
3+
from typing import Text
4+
import barcode
5+
from barcode import writer
6+
7+
from barcode.writer import ImageWriter
8+
string = " Welcome to Python Programming Language "
9+
10+
text = str(string)
11+
12+
13+
code = barcode.get_barcode_class("code128")
14+
15+
image = code(string, writer=ImageWriter())
16+
17+
save_img = image.save('My final Barcode')

0 commit comments

Comments
 (0)