dp-eh600热敏打印机(adafruit)的驱动程序。

thermalprinter的Python项目详细描述


https://travis-ci.org/BoboTiG/thermalprinter.svg?branch=master

管理dp-eh600热敏打印机的python模块(由adafruit销售)。

安装

简单到:

python3 -m pip install --upgrade --user thermalprinter

用法

一个例子胜过千言万语:

fromPILimportImagefromThermalPrinterimport*withThermalPrinter(port='/dev/ttyAMA0')asprinter:# Pictureprinter.image(Image.open('gnu.png'))# Bar codesprinter.barcode_height(80)printer.barcode_position(BarCodePosition.BELOW)printer.barcode_width(3)printer.barcode('012345678901',BarCode.EAN13)# Stylesprinter.out('Bold',bold=True)printer.out('Double height',double_height=True)printer.out('Double width',double_width=True)printer.out('Inverse',inverse=True)printer.out('Rotate 90°',rotate=True,codepage=CodePage.ISO_8859_1)printer.out('Strike',strike=True)printer.out('Underline',underline=1)printer.out('Upside down',upside_down=True)# Chinese (almost all alphabets exist)printer.out('现代汉语通用字表',chinese=True,chinese_format=Chinese.UTF_8)# Greek (excepted the ΐ character)printer.out('Στην υγειά μας!',codepage=CodePage.CP737)# Accentsprinter.out('Voilà !',justify='C',strike=True,underline=2,codepage=CodePage.ISO_8859_1)# Line feedsprinter.feed(2)

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

推荐PyPI第三方库


热门话题
java如何在Salesforce中查询自定义对象?   RichFaces 4中的java ExtendedDataTable:数据模型处理   java Android类层次结构和带有片段的接口   java如何在文件中保存JLabel的颜色/大小?   java编辑类中的返回值而不修改类本身?   安卓如何替换字符串java中的ï»   1.3.7.发布>1.4.1。发布| java。lang.NoSuchMethodError:org。springframework。靴子建设者SpringApplicationBuilder。展示横幅   java列表保存在模型中,而不在setter中进行设置   java如何打开一个窗口。windows中的ks文件?   Java HashMap获取值(其中大部分值)   vps的javascript Websocketurl?   使用byte buddy或某些库进行java评测   java Dom4j获取单节点文本值