A connection to the CUPS server. Before it is created the
connection server and username should be set using cups.setServer and
cups.setUser;
otherwise the defaults will be used. When a Connection object is
instantiated it results in a call to the libcups function
httpConnectEncrypt().
|
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
a new object with type S, a subtype of T
|
|
|
|
None
|
|
None
|
|
None
|
|
None
|
|
dict
|
|
None
|
|
None
|
|
None
|
|
None
|
|
None
|
|
integer
|
|
None
|
|
None
|
|
None
|
|
None
|
|
None
|
|
None
|
|
dict
|
getClasses()
Returns:
a dict, indexed by name, of objects representing classes. |
|
|
string or None
|
|
dict
|
getDests()
Returns:
a dict representing available destinations. |
|
|
dict
|
getDevices(limit=0,
exclude_schemes=None,
include_schemes=None)
Returns:
a dict, indexed by device URI, of dicts representing devices, indexed
by attribute. |
|
|
dict
|
getDocument(printer_uri,
job_id,
document_number)
Fetches the job document and stores it in a temporary file. |
|
|
None
|
getFile(resource,
filename=None,
fd=-1,
file=None)
Fetch a CUPS server resource to a local file. |
|
|
dict
|
|
dict
|
getJobs(which_jobs='not-completed',
my_jobs=False,
limit=-1,
first_job_id=-1,
requested_attributes=None)
Fetch a list of jobs. |
|
|
list
|
|
string
|
getPPD(name)
Fetch a printer's PPD. |
|
|
(status,modtime,filename)
|
getPPD3(name,
modtime=...,
filename=...)
Fetch a printer's PPD if it is newer. |
|
|
dict
|
getPPDs(limit=0,
exclude_schemes=None,
include_schemes=None,
ppd_natural_language=None,
ppd_device_id=None,
ppd_make=None,
ppd_make_and_model=None,
ppd_model_number=-1,
ppd_product=None,
ppd_psversion=None,
ppd_type=None)
Returns:
a dict, indexed by PPD name, of dicts representing PPDs, indexed by
attribute. |
|
|
dict
|
getPrinterAttributes(name=None,
uri=None,
requested_attributes=None)
Fetch the attributes for a printer, specified either by name or by
uri but not both. |
|
|
dict
|
getPrinters()
Returns:
a dict, indexed by name, of dicts representing queues, indexed by
attribute. |
|
|
string
|
getServerPPD(ppd_name)
Fetches the named PPD and stores it in a temporary file. |
|
|
integer list
|
|
None
|
moveJob(printer_uri=None,
job_id=-1,
job_printer_uri)
Move a job specified by printer_uri and jobid (only one need be
given) to the printer specified by job_printer_uri. |
|
|
integer
|
printFile(printer,
filename,
title,
options)
Print a file. |
|
|
integer
|
printFiles(printer,
filenames,
title,
options)
Print a list of files. |
|
|
job ID
|
|
None
|
putFile(resource,
filename=None,
fd=-1,
file=None)
This is for uploading new configuration files for the CUPS server. |
|
|
|
|
None
|
|
None
|
restartJob(job_id,
job_hold_until=None)
Restart a job. |
|
|
None
|
|
None
|
setJobHoldUntil(jobid,
job_hold_until)
Specifies when a job should be printed. |
|
|
None
|
|
None
|
|
None
|
setPrinterInfo(name,
info)
Set the human-readable information about a printer. |
|
|
None
|
|
None
|
|
None
|
|
None
|
setPrinterShared(name,
shared)
Set whether a printer is shared with other people. |
|
|
None
|
|
None
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|