This class implements most of the backend handling code for Stylus Toolbox.
It inherits a CUPS interface from pkipplib.CUPS and runs escputil using,
alternatively, pexpect or pxssh, for local and remote printers, respectively.
Methods
|
|
|
|
__init__
|
__init__ (
self,
url=None,
printer=None,
)
Create a Printer instance. Can set one up for particular CUPS url
and printer queuename.
|
|
clean_print_heads
|
clean_print_heads ( self )
Clean the print heads.
|
|
get_CUPS_auth
|
get_CUPS_auth ( self, url )
Display an AuthDialog to login to a CUPS url .
|
|
get_device
|
get_device (
self,
url=None,
remote=None,
remotehost=None,
)
Turns a CUPS device uri into a raw USB device for either a local printer
or a remote printer on a CUPS server running on remotehost .
|
|
get_ink_levels
|
get_ink_levels ( self )
Return a dictionary containing the ink cartridge color names as key and
the percent full value as value.
|
|
get_model_name
|
get_model_name ( self )
Return the model name reported by escputil -d
|
|
get_raw_usb_device
|
get_raw_usb_device (
self,
uri,
remote=None,
remotehost=None,
)
Turns a CUPS device usb:// uri into a raw USB device for either a
local printer or a remote printer on a CUPS server running on
remotehost by using HAL/DBus.
|
|
get_supported_models
|
get_supported_models ( self )
Return a dictionary containing the list of printer models supported by
escputil , with the model name as key and the escputil model ID used
for the -m switch as value.
|
|
nozzle_check
|
nozzle_check ( self )
Print a nozzle check test page.
|
|
run_escputil
|
run_escputil ( self, switches )
Assembles the escputil command line and executes it using pexpect or
pxssh (via an ssh instance), for local and remote printers,
respectively.
|
|