用于生成条形码的python库。

steenzout.barcode的Python项目详细描述


#Steenzout.条形码

[![pypi](https://img.shields.io/pypi/v/steenzout.barcode.svg)](https://pypi.python.org/pypi/steenzout.barcode/)
[![构建状态](https://travis-ci.org/steenzout/python-barcode.svg?branch=master)(https://travis ci.org/steenzout/python条形码)
[![代码运行状况](https://landscape.io/github/steenzout/python-barcode/master/landscape.svg?style=flat)(https://landscape.io/github/steenzout/python barcode/master)
[![覆盖状态](https://workalls.io/repos/github/steenzout/python-barcode/badge.svg?branch=master)(https://coveralls.io/r/steenzout/python条形码)
[![需求状态](https://requires.io/github/steenzout/python-barcode/requirements.svg?branch=master)(https://requires.io/github/steenzout/python-barcode/requirements/?分支=主)
[![文档状态](https://readthedocs.org/projects/python-steenzout-barcode/badge/?版本=最新](http://python-steenzout-barcode.readthedocs.io/en/latest/?徽章=最新)

[![许可证](https://img.shields.io/badge/license-mit-blue.svg?style=flat)][许可证]
[![项目统计](https://www.openhub.net/p/python steenzout barcode/widgets/project_thin_badge.gif)(https://www.openhub.net/p/python steenzout barcode/)

created as SVG objects.


## Installation

```
$ pip install steenzout.barcode
```


## Bar codes

- EAN-8
- EAN-13
- UPC-A
- JAN
- ISBN-10
- ISBN-13
- ISSN
- Code 39
- Code 128
- PZN


## Usage

```
>>> 从Steenzout导入条码
>>;gt;gt;条码。提供的条码
[u'code 39',u'code 128',u'ean',u'ean ean13',u'ean13',u'ean13',u'ean8',u'gs1',u'gtin',
u'isbn',u'isbn10',u'isbn13',u'issn',u'jan',u'pzn',u'upc',u'upca']
>>>>>gt;ean>gt;ean=条码。获取的条码分类('ean13')
>>>;ean
>>>>;ean>>>>>>>>gt;ean gt;ean<;“条码.ean.europeanArticleArticleArticleArticleNumber13”>;
>>>gt>>>gt;ean=ean(u'5912312312341234557')
>>>;ean
>>;lt;条码.ean.ean.europeanArticleNumber13对象位于0x00be98f0>;
> gt;
>;fullname=ean.save('ean13‘u条码’'ean13‘ean13‘u条码’)
>>>;fullname
>u'ean13‘u条码.svg.svg'
;以png
>>>>>>>;例如用png<>;从barcode.writer导入imagewriter
>>gt;ean=ean(u'5912312341234557',writer=imagewriter())
>>gt;fullname=ean.save('ean13'u barcode')
u'ean13'u barcode.png'
v0.4.2新入版
>>gt;
>>>>>>从stringio导入stringio导入stringio
>>>;fp=stringio()
>>>>>>>>>从stringio导入stringio导入stringio
>>>>>>>>>>>>>>fp;ean。写入(fp或
>;>;f=open('/my/new/file,'wb')
>>>gt;ean.write(f)pil(imagewriter)在这里生成原始格式
v0.5.0中的新版本pil(imagewriter)在这里生成原始格式;from barcode import generate
>>gt;gt;name=generate('ean13',u 5912341234557',output='barcode'u barcode'u svg')
>>gt;name
>u'barcode'u'ean13',u'59123123412323434575','u'u 59123123123412345234575','output='barcode'u barcode'svg'svg'sv
>>fp=stringio()
>;>generate('EAN13',U'5901234123457',writer=imagewriter(),output=fp)
>;
`````

现在在图形应用程序中或在浏览器中打开EAN13_u条码
[svg png],并查看创建的条码。就这样。



3}创建-t png“my text”outfile“outfile”outfile
新条码另存为outfile.png。


请尝试“pybarcode-h”获取帮助。
````




``链接

-[code 39(https://en.wikipedia.org/wiki/code-39)
-[code 128(https://en.wikipedia.wikipedia.org/wikipedia.org/wikipedia/wiki/code-128)
-[ean(https://en.wikipedia.wikipedia.org/wikipedia.org/wikipedia./国际物品编号(EAN)
-[国际标准书号](https://en.wikipedia.org/wiki/International_Standard_Book_Number)
-[国际标准书号](https://en.wikipedia.org/wiki/International_Standard_Serial_Number)
-[一月](https://en.wikipedia.org/wiki/international-article-article-number(ean)japanese-article-number)
-[upc](https://en.wikipedia.org/wiki/universal-article-code)


[license]:https://raw.githubusercontent.com/steenzout/python-barcode/steenzout/license“mit license”
[pybarcode]:https://bitbucket.org/whitie/python-barcode“条形码”
[viivakoodi]:https://github.com/kxepal/viivakoodi“viivakoodi”

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java操作数组上的字符串   java JAXB内容未实例化   图形在Java中如何绘制垂直居中的字符串?   java Apache Ant:使用Junit时出现NoClassDefFoundError   java无法从服务器上运行perl脚本   如何在java中沿树进行预排序遍历,并打印0和1以对应每个节点上的特定字符?   java如何创建。p12文件?   java线程访问无效   java只匹配命名空间中的XML节点,而不知道NS前缀   从java获取2d arraylist元素   数组Java动态集合对象   java Xpath通过通配符或布尔运算查找以相同名称开头的节点?   java注释元素类型   java在中看不到Super()。反编译后的类文件