File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Requirements
2929- Setuptools/distribute for installation.
3030- Python 3.5 or above
3131- Program to open SVG objects (your browser should do it)
32- - Optional: PIL to render barcodes as images (PNG, JPG, ...)
32+ - Optional: Pillow to render barcodes as images (PNG, JPG, ...)
3333
3434
3535Installation
@@ -92,7 +92,7 @@ Interactive::
9292 >>> ean.write(fp)
9393 # or
9494 >>> f = open('/my/new/file', 'wb')
95- >>> ean.write(f) # PIL (ImageWriter) produces RAW format here
95+ >>> ean.write(f) # Pillow (ImageWriter) produces RAW format here
9696 # New in v0.5.0
9797 >>> from barcode import generate
9898 >>> name = generate('EAN13', '5901234123457', output='barcode_svg')
@@ -122,6 +122,7 @@ v0.9.1
122122~~~~~~
123123
124124* Officially support Python 3.7
125+ * Refer to Pillow in the docs, rather than PIL.
125126
126127v0.9.0
127128~~~~~~
Original file line number Diff line number Diff line change 77
88This package provides a simple way to create standard barcodes.
99It needs no external packages to be installed, the barcodes are
10- created as SVG objects. If PIL (Python Imaging Library) is
11- installed, the barcodes can also be rendered as images (all
12- formats supported by PIL).
10+ created as SVG objects. If Pillow is installed, the barcodes can also be
11+ rendered as images (all formats supported by Pillow).
1312"""
1413
1514from barcode .errors import BarcodeNotFoundError
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ def list_types(args, parser=None):
3333 print ('Available image formats' )
3434 print ('Standard: svg' )
3535 if ImageWriter is not None :
36- print ('PIL :' , ', ' .join (IMG_FORMATS ))
36+ print ('Pillow :' , ', ' .join (IMG_FORMATS ))
3737 else :
38- print ('PIL : disabled' )
38+ print ('Pillow : disabled' )
3939 print ('\n ' )
4040
4141
@@ -68,7 +68,7 @@ def main():
6868 msg = []
6969 if ImageWriter is None :
7070 msg .append (
71- 'Image output disabled (PIL not found), --type option disabled.'
71+ 'Image output disabled (Pillow not found), --type option disabled.'
7272 )
7373 else :
7474 msg .append (
Original file line number Diff line number Diff line change 1818 except ImportError :
1919 import logging
2020 log = logging .getLogger ('pyBarcode' )
21- log .info ('PIL not found. Image output disabled' )
21+ log .info ('Pillow not found. Image output disabled' )
2222 Image = ImageDraw = ImageFont = None # lint:ok
2323
2424
Original file line number Diff line number Diff line change 11Introduction
22============
33
4- This package was created to have barcodes available without having
5- PIL _ (Python Imaging Library) installed. As of version 0.4b1 PIL
6- is also supported for creating barcodes .
4+ This package was created to have barcodes available with pure-python.
5+ Pillow _ is required for exporting for exporting images (png, jpg), although not
6+ for SVGs .
77
88All you need to create a barcode is to know the system (EAN, UPC, ...)
99and the code (e.g. for EAN-13: 123456789102). As you see, you do not
@@ -13,7 +13,7 @@ keyword argument (default is True).
1313
1414As of version 0.7beta3 Python 3 is supported, but not well tested.
1515
16- .. _ PIL : http ://www.pythonware.com/products/pil
16+ .. _ Pillow : https ://python-pillow.org/
1717
1818Creating barcodes as SVG
1919------------------------
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pyBarcode ImageWriter
33
44.. versionadded :: 0.4b1
55
6- Creates barcodes as image. All imagetypes supported by PIL are availble.
6+ Creates barcodes as image. All imagetypes supported by Pillow are availble.
77
88Special Options
99---------------
@@ -15,7 +15,7 @@ Special Options:
1515~~~~~~~~~~~~~~~~
1616
1717:format:
18- The image file format as *string *. All formats supported by PIL are
18+ The image file format as *string *. All formats supported by Pillow are
1919 valid (e.g. PNG, JPEG, BMP, ...).
2020 Defaults to **PNG **.
2121
Original file line number Diff line number Diff line change 1212 author = 'Thorsten Weimann et al' ,
1313 author_email = 'weimann.th@yahoo.com' ,
1414 description = (
15- 'Create standard barcodes with Python. No external modules needed '
16- '(optional PIL support included).'
15+ 'Create standard barcodes with Python. No external modules needed. '
16+ '(optional Pillow support included).'
1717 ),
1818 long_description = Path ('README.rst' ).read_text (),
1919 classifiers = [
Original file line number Diff line number Diff line change 4545IMAGES = ('<h3>As PNG-Image</h3><br>\n '
4646 '<img src="{filename}" alt="PNG {name}"></p>\n ' )
4747
48- NO_PIL = '<h3>PIL was not found. No PNG-Image created.</h3></p>\n '
48+ NO_PIL = '<h3>Pillow was not found. No PNG-Image created.</h3></p>\n '
4949
5050TESTCODES = (
5151 ('ean8' , '40267708' ),
You can’t perform that action at this time.
0 commit comments