ipptool python包装器

pyipptool的Python项目详细描述


https://travis-ci.org/ezeep/pyipptool.svg?branch=masterhttps://coveralls.io/repos/ezeep/pyipptool/badge.pngLatest PyPI versionCode Health

ipptool的帮助下,为python查询cups或ipp设备提供了方便的ipp请求生成器。

设置

python setup.py install

测试

python setup.py test

配置

~/.pyipptool.cfg/etc/pyipptool/pyipptol.cfg中添加以下内容。

[main]ipptool_path=/usr/bin/ipptoolcups_uri=http://localhost:631/;If authentication is requiredlogin=adminpassword=secretgraceful_shutdown_time=2timeout=10

其中ipptool_path指向已安装的ipptool的绝对路径

用法

rssnotifier的printer xyz类创建无限时间订阅

>>>frompyipptoolimportcreate_printer_subscription>>>create_printer_subscription(printer_uri='http://localhost:631/classes/printer-XYZ',requesting_user_name='admin',notify_recipient_uri='rss://',notify_events='all',notify_lease_duration=0){'Name':'Create Printer Subscription','Operation':'Create-Printer-Subscription','RequestAttributes':[{'attributes-charset':'utf-8','attributes-natural-language':'en','printer-uri':'http://localhost:631/classes/printer-XYZ','requesting-user-name':'admin'},{'notify-events':'all','notify-lease-duration':0,'notify-recipient-uri':'rss://'}],'ResponseAttributes':[{'attributes-charset':'utf-8','attributes-natural-language':'en'},{'notify-subscription-id':23}],'StatusCode':'successful-ok','Successful':True,'notify-subscription-id':23}

版权所有2013 Ezeep GmbH

根据apache许可证2.0版(以下简称“许可证”)授权; 除非符合许可证,否则您不能使用此文件。 您可以在

http://www.apache.org/licenses/LICENSE-2.0

除非适用法律要求或书面同意,否则软件 根据许可证分发是按“原样”分发的, 无任何明示或默示的保证或条件。 有关管理权限的特定语言和 许可下的限制。

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

推荐PyPI第三方库


热门话题
java如何从ImageIO中排除特定的TIFF读取器?   JavaJMockit和passbyreference。我们中一定有一个人错了(可能是我!)   java Android camera2放弃了牛轧糖的表面,但在棉花糖上工作   java按字符串中出现的顺序对字符数组进行排序   如何获取Groovy生成的java源代码   java无法使用AutoIT和Selenium Webdriver在所需位置/文件夹保存图像   java为什么我的冒泡排序代码会打印出这些奇怪的东西?   java JAXB:typesafeEnumMemberName=“generateName”是否可自定义?   Java编程输入:今天是星期天输出:星期天是今天   java不理解首个OOAD书的吉他示例   java如何从JformattedTextfield检索货币格式值   java可以从相同的源代码生成功能不同的可执行文件吗?