hplip-3.18.6.tar.gz
惠普打印机linux打印驱动,便于用户在使用linux打印机时找不到对应的驱动信息,使用文件中的PPD文件即可使用
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2015 HP Development Company L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not write to the Free Software
# Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
#
# Author: Don Welch Naga Samrat Chowdary Narla
#
__version__ = ‘5.0‘
__title__ = ‘Printer Cartridge Alignment Utility‘
__mod__ = ‘hp-align‘
__doc__ = “Cartridge alignment utility for HPLIP supported inkjet printers. (Note: Not all printers require the use of this utility).“
# Std Lib
import sys
import re
import getopt
import operator
import os
# Local
from base.g import *
from base import device status utils maint tui module
from prnt import cups
try:
from importlib import import_module
except ImportError as e:
log.debug(e)
from base.utils import dyn_import_mod as import_module
def enterAlignmentNumber(letter hortvert colors line_count maximum):
ok value = tui.enter_range(“From the printed Alignment page Enter the best aligned value for line %s (1-%d): “ %
(letter maximum)
1
maximum)
if not ok:
sys.exit(0)
return ok value
def enterPaperEdge(maximum):
ok value = tui.enter_range(“Enter numbered arrow that is best aligned with the paper edge (1-%d): “
% maximum
1
maximum)
if not ok:
sys.exit(0)
return ok value
def colorAdj(line maximum):
ok value = tui.enter_range(“Enter the numbered box on line %s that is best color matched to the background color (1-%d): “ %
(line maximum)
1
maximum)
if not ok:
sys.exit(0)
return ok value
def bothPensRequired():
log.error(“Cannot perform alignment with 0 or 1 cartridges installed.
Please install both cartridges and try again.“)
def invalidPen():
log.error(“Invalid cartridge(s) installed.
Please install valid cartridges and try again.“)
def invalidPen2():
log.error(“Invalid cartridge(s) installed. Cannot align with only the photo cartridge installed.
Please install other cartridges and try again.“)
def aioUI1():
log.info(“To perform alignment you will need the alignment page that is automatically
printed after you install a print cartridge.“)
log.info(“
p Print the a
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)