[?1034hHelp on module cups: NAME cups FILE /usr/lib/python2.5/site-packages/cups.so CLASSES __builtin__.object Attribute Connection Constraint Dest Group Option PPD exceptions.Exception(exceptions.BaseException) HTTPError IPPError class Attribute(__builtin__.object) | PPD attribute | ============= | | A PPD attribute. | | @type name: string | @ivar name: attribute name | @type spec: string | @ivar spec: specifier string (if any) | @type text: string | @ivar text: human-readable text (if any) | @type value: string | @ivar value: attribute value | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | __repr__(...) | x.__repr__() <==> repr(x) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | name | name | | spec | spec | | text | text | | value | value | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class Connection(__builtin__.object) | CUPS connection | =============== | | A connection to the CUPS server. Before it is created the | connection server and username should be set using | L{cups.setServer} and L{cups.setUser}; otherwise the defaults will | be used. When a Connection object is instantiated it results in a | call to the libcups function httpConnectEncrypt(). | | The constructor takes optional arguments host, port, and encryption, | which default to the values of L{cups.getServer}(), | L{cups.getPort}(), and L{cups.getEncryption}(). | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | __repr__(...) | x.__repr__() <==> repr(x) | | acceptJobs(...) | acceptJobs(name) -> None | | Cause printer to accept jobs. | @type name: string | @param name: queue name | @raise IPPError: IPP problem | | addPrinter(...) | addPrinter(name) -> None | | Add or adjust a print queue. Several parameters can select which | PPD to use (filename, ppdname, and ppd) but only one may be | given. | | @type filename: string | @keyword filename: local filename of PPD file | @type ppdname: string | @keyword ppdname: filename from L{getPPDs} | @type info: string | @keyword info: human-readable information about the printer | @type location: string | @keyword location: human-readable printer location | @type device: string | @keyword device: device URI string | @type ppd: L{cups.PPD} instance | @keyword ppd: PPD object | @raise IPPError: IPP problem | | addPrinterOptionDefault(...) | addPrinterOptionDefault(name, option, value) -> None | | Set a network default option. Jobs submitted to the named queue | will have the job option added if it is not already present in the | job. This works with CUPS servers of at least version 1.2. | | @type name: string | @param name: queue name | @type option: string | @param option: option name, for example 'job-priority' | @type value: string | @param value: option value as a string | @raise IPPError: IPP problem | | addPrinterToClass(...) | addPrinterToClass(name, class) -> None | | Add a printer to a class. If the class does not yet exist, | it is created. | | @type name: string | @param name: queue name | @type class: string | @param class: class name | @raise IPPError: IPP problem | | adminGetServerSettings(...) | adminGetServerSettings() -> dict | | Get server settings. | | @return: dict representing server settings; keywords include | L{CUPS_SERVER_DEBUG_LOGGING}, L{CUPS_SERVER_REMOTE_ADMIN}, | L{CUPS_SERVER_REMOTE_PRINTERS}, L{CUPS_SERVER_SHARE_PRINTERS}, | L{CUPS_SERVER_USER_CANCEL_ANY} | @see: L{adminSetServerSettings} | @raise IPPError: IPP problem | | adminSetServerSettings(...) | adminSetServerSettings(settings) -> None | | Set server settings. | | @type settings: dict | @param settings: dict of server settings | @see: L{adminGetServerSettings} | @raise IPPError: IPP problem | | authenticateJob(...) | authenticateJob(jobid, auth_info=None) -> None | | @type jobid: integer | @param jobid: job ID to authenticate | @type auth_info: optional string list | @param auth_info: authentication details | @raise IPPError: IPP problem | | cancelAllJobs(...) | cancelAllJobs(uri, my_jobs=False, purge_jobs=True) -> None | | @type uri: string | @param uri: printer URI | @type my_jobs: boolean | @param my_jobs: whether to restrict operation to jobs owned by | the current CUPS user (as set by L{cups.setUser}). | @type purge_jobs: boolean | @param purge_jobs: whether to remove data and control files | @raise IPPError: IPP problem | | cancelJob(...) | cancelJob(jobid) -> None | | @type jobid: integer | @param jobid: job ID to cancel | @raise IPPError: IPP problem | | cancelSubscription(...) | cancelSubscription(id) -> None | | Cancel a subscription. | | @type id: integer | @param id: subscription ID | @raise IPPError: IPP problem | | createSubscription(...) | createSubscription(uri) -> integer | | Create a subscription. | | @type uri: string | @param uri: URI for object | @type events: string list | @keyword events: events to receive notifications for | @type job_id: integer | @keyword job_id: job ID to receive notifications for | @type recipient_uri: string | @keyword recipient_uri: URI for notifications recipient | @type lease_duration: integer | @keyword lease_duration: lease duration in seconds | @type time_interval: integer | @keyword time_interval: time interval | @type user_data: string | @keyword user_data: user data to receieve with notifications | @return: subscription ID | @raise IPPError: IPP problem | | deleteClass(...) | deleteClass(class) -> None | | Delete a class. | | @type class: string | @param class: class name | @raise IPPError: IPP problem | | deletePrinter(...) | deletePrinter(name) -> None | | Delete a printer. | | @type name: string | @param name: queue name | @raise IPPError: IPP problem | | deletePrinterFromClass(...) | deletePrinterFromClass(name, class) -> None | | Remove a printer from a class. If the class would be left empty, | it is removed. | | @type name: string | @param name: queue name | @type class: string | @param class: class name | @raise IPPError: IPP problem | | deletePrinterOptionDefault(...) | deletePrinterOptionDefault(name, option) -> None | | Removes a network default option. See L{addPrinterOptionDefault}. | | @type name: string | @param name: queue name | @type option: string | @param option: option name, for example 'job-priority' | @raise IPPError: IPP problem | | disablePrinter(...) | disablePrinter(name) -> None | | Disable printer. This prevents the printer from processing its | job queue. | | @type name: string | @param name: queue name | @type reason: string | @keyword reason: optional human-readable reason for disabling the | printer | @raise IPPError: IPP problem | | enablePrinter(...) | enablePrinter(name) -> None | | Enable printer. This allows the printer to process its job queue. | | @type name: string | @param name: queue name | @raise IPPError: IPP problem | | getClasses(...) | getClasses() -> dict | | @return: a dict, indexed by name, of objects representing | classes. Each class object is either a string, in which case it | is for the remote class; or a list, in which case it is a list of | queue names. | @raise IPPError: IPP problem | | getDefault(...) | getDefault() -> string or None | | Get the system default printer. | | @return: default printer name or None | | getDests(...) | getDests() -> dict | | @return: a dict representing available destinations. Each | dictionary key is a pair of (queue, instance) strings, and the | dictionary value is a L{cups.Dest} object. In addition to the | available destinations, a special dictionary key (None,None) is | provided for looking up the default destination; this destination | will also be available under its own key. | @raise IPPError: IPP problem | | getDevices(...) | getDevices() -> dict | | @return: a dict, indexed by device URI, of dicts representing | devices, indexed by attribute. | @raise IPPError: IPP problem | | getDocument(...) | getDocument(printer_uri, job_id, document_number) -> dict | | Fetches the job document and stores it in a temporary file. | | @type printer_uri: string | @param printer_uri: the printer-uri for the printer | @type job_id: integer | @param job_id: the job ID | @type document_number: integer | @param document_number: the document number to retrieve | @return: a dict with the following keys: 'file' (string), temporary filename holding the job document; 'document-format' (string), its MIME type. There may also be a 'document-name' key, in which case this is for the document name. | @raise RuntimeError: Not supported in libcups until 1.4 | @raise IPPError: IPP problem | | getFile(...) | getFile(resource, filename=None, fd=-1, file=None) -> None | | Fetch a CUPS server resource to a local file. | | This is for obtaining CUPS server configuration files and | log files. | | @type resource: string | @param resource: resource name | @type filename: string | @param filename: name of local file for storage | @type fd: int | @param fd: file descriptor of local file | @type file: file | @param file: Python file object for local file | @raise HTTPError: HTTP problem | | getJobAttributes(...) | getJobAttributes(jobid, requested_attributes=None) -> dict | | Fetch job attributes. | @type jobid: integer | @param jobid: job ID | @type requested_attributes: string list | @param requested_attributes: list of requested attribute names | @return: a dict representing job attributes. | @raise IPPError: IPP problem | | getJobs(...) | getJobs(which_jobs='not-completed', my_jobs=False, limit=-1, first_job_id=-1) -> dict | Fetch a list of jobs. | @type which_jobs: string | @param which_jobs: which jobs to fetch; possible values: | 'completed', 'not-completed', 'all' | @type my_jobs: boolean | @param my_jobs: whether to restrict the returned jobs to those | owned by the current CUPS user (as set by L{cups.setUser}). | @return: a dict, indexed by job ID, of dicts representing job | attributes. | @type limit: integer | @param limit: maximum number of jobs to return | @type first_job_id: integer | @param first_job_id: lowest job ID to return | @raise IPPError: IPP problem | | getNotifications(...) | getNotifications(subscription_ids) -> list | | Get notifications for subscribed events. | | @type subscription_ids: integer list | @param subscription_ids: list of subscription IDs to receive | notifications for | @return: list of dicts, each representing an event | @raise IPPError: IPP problem | | getPPD(...) | getPPD(name) -> string | | Fetch a printer's PPD. | | @type name: string | @param name: queue name | @return: temporary PPD file name | @raise IPPError: IPP problem | | getPPDs(...) | getPPDs() -> dict | | @return: a dict, indexed by PPD name, of dicts representing | PPDs, indexed by attribute. | @raise IPPError: IPP problem | | getPrinterAttributes(...) | getPrinterAttributes(name=None, uri=None, requested_attributes=None) -> dict | Fetch the attributes for a printer, specified either by name or by | uri but not both. | | @type name: string | @param name: queue name | @type uri: string | @param uri: queue URI | @type requested_attributes: string list | @param requested_attributes: list of requested attribute names | @return: a dict, indexed by attribute, of printer attributes | for the specified printer. | | Attributes: | - 'job-sheets-supported': list of strings | - 'job-sheets-default': tuple of strings (start, end) | - 'printer-error-policy-supported': if present, list of strings | - 'printer-error-policy': if present, string | - 'printer-op-policy-supported': if present, list of strings | - 'printer-op-policy': if present, string | | There are other attributes; the exact list of attributes returned | will depend on the IPP server. | @raise IPPError: IPP problem | | getPrinters(...) | getPrinters() -> dict | | @return: a dict, indexed by name, of dicts representing | queues, indexed by attribute. | @raise IPPError: IPP problem | | getServerPPD(...) | getServerPPD(ppd_name) -> string | | Fetches the named PPD and stores it in a temporary file. | | @type ppd_name: string | @param ppd_name: the ppd-name of a PPD | @return: temporary filename holding the PPD | @raise RuntimeError: Not supported in libcups until 1.3 | @raise IPPError: IPP problem | | getSubscriptions(...) | getSubscriptions(uri) -> integer list | | Get subscriptions. | | @type uri: string | @param uri: URI for object | @type my_subscriptions: boolean | @keyword my_subscriptions: only return subscriptions belonging to | the current user (default False) | @type job_id: integer | @keyword job_id: only return subscriptions relating to this job | @return: list of subscriptions | @raise IPPError: IPP problem | | printFile(...) | printFile(printer, filename, title, options) -> integer | | Print a file. | | @type printer: string | @param printer: queue name | @type filename: string | @param filename: local file path to the document | @type title: string | @param title: title of the print job | @type options: dict | @param options: dict of options | @return: job ID | @raise IPPError: IPP problem | | printFiles(...) | printFiles(printer, filenames, title, options) -> integer | | Print a list of files. | | @type printer: string | @param printer: queue name | @type filenames: list | @param filenames: list of local file paths to the documents | @type title: string | @param title: title of the print job | @type options: dict | @param options: dict of options | @return: job ID | @raise IPPError: IPP problem | | printTestPage(...) | printTestPage(name) -> job ID | | Print a test page. | | @type name: string | @param name: queue name | @type file: string | @keyword file: input file (default is CUPS test page) | @type title: string | @keyword title: job title (default 'Test Page') | @type format: string | @keyword format: document format (default 'application/postscript') | @type user: string | @keyword user: user to submit the job as | @raise IPPError: IPP problem | | putFile(...) | putFile(resource, filename=None, fd=-1, file=None) -> None | | This is for uploading new configuration files for the CUPS | server. Note: L{adminSetServerSettings} is a way of | adjusting server settings without needing to parse the | configuration file. | @type resource: string | @param resource: resource name | @type filename: string | @param filename: name of local file to upload | @type fd: int | @param fd: file descriptor of local file | @type file: file | @param file: Python file object for local file | @raise HTTPError: HTTP problem | | rejectJobs(...) | rejectJobs(name) | | Cause printer to reject jobs. | | @type name: string | @param name: queue name | @type reason: string | @keyword reason: optional human-readable reason for rejecting jobs | @raise IPPError: IPP problem | | renewSubscription(...) | renewSubscription(id, lease_duration=-1) -> None | | Renew a subscription. | | @type id: integer | @param id: subscription ID | @type lease_duration: integer | @param lease_duration: lease duration in seconds | @raise IPPError: IPP problem | | restartJob(...) | restartJob(jobid) -> None | | Restart a job. | | @type jobid: integer | @param jobid: job ID to restart | @raise IPPError: IPP problem | | setDefault(...) | setDefault(name) -> None | | Set the system default printer. Note that this can be over-ridden | on a per-user basis using the lpoptions command. | | @type name: string | @param name: queue name | @raise IPPError: IPP problem | | setJobHoldUntil(...) | setJobHoldUntil(jobid, job_hold_until) -> None | | Specifies when a job should be printed. | @type jobid: integer | @param jobid: job ID to adjust | @type job_hold_until: string | @param job_hold_until: when to print the job; examples: 'hold', | 'immediate', 'restart', resume' | @raise IPPError: IPP problem | | setPrinterDevice(...) | setPrinterDevice(name, device_uri) -> None | | Set the device URI for a printer. | | @type name: string | @param name: queue name | @type device_uri: string | @param device_uri: device URI | @raise IPPError: IPP problem | | setPrinterErrorPolicy(...) | setPrinterErrorPolicy(name, policy) -> None | | Set the printer's error policy. | | @type name: string | @param name: queue name | @type policy: string | @param policy: policy name; supported policy names can be found | by using the L{getPrinterAttributes} function and looking for the | 'printer-error-policy-supported' attribute | @raise IPPError: IPP problem | | setPrinterInfo(...) | setPrinterInfo(name, info) -> None | | Set the human-readable information about a printer. | | @type name: string | @param name: queue name | @type info: string | @param info: human-readable information about the printer | @raise IPPError: IPP problem | | setPrinterJobSheets(...) | setPrinterJobSheets(name, start, end) -> None | | Specifies job sheets for a printer. | | @type name: string | @param name: queue name | @type start: string | @param start: name of a sheet to print before each job | @type end: string | @param end: name of a sheet to print after each job | @raise IPPError: IPP problem | | setPrinterLocation(...) | setPrinterLocation(name, location) -> None | | Set the human-readable printer location | | @type name: string | @param name: queue name | @type location: string | @param location: human-readable printer location | @raise IPPError: IPP problem | | setPrinterOpPolicy(...) | setPrinterOpPolicy(name, policy) -> None | | Set the printer's operation policy. | | @type name: string | @param name: queue name | @type policy: string | @param policy: policy name; supported policy names can be found | by using the L{getPrinterAttributes} function and looking for the | 'printer-op-policy-supported' attribute | @raise IPPError: IPP problem | | setPrinterShared(...) | setPrinterShared(name, shared) -> None | | Set whether a printer is shared with other people. This works | with CUPS servers of at least version 1.2, by setting the | printer-is-shared printer attribute. | | @type name: string | @param name: queue name | @type shared: boolean | @param shared: whether printer should be shared | @raise IPPError: IPP problem | | setPrinterUsersAllowed(...) | setPrinterUsersAllowed(name, allowed) -> None | | Set the list of users allowed to use a printer. This works | with CUPS server of at least version 1.2, by setting the | requesting-user-name-allowed printer attribute. | | @type name: string | @param name: queue name | @type allowed: string list | @param allowed: list of allowed users; ['all'] | means there will be no user-name restriction. | @raise IPPError: IPP problem | | setPrinterUsersDenied(...) | setPrinterUsersDenied(name, denied) -> None | | Set the list of users denied the use of a printer. This works | with CUPS servers of at least version 1.2, by setting the | requesting-user-name-denied printer attribute. | | @type name: string | @param name: queue name | @type denied: string list | @param denied: list of denied users; ['none'] | means there will be no user-name restriction. | @raise IPPError: IPP problem | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class Constraint(__builtin__.object) | PPD constraint | ============== | | A PPD constraint. | | @type option1: string | @ivar option1: first option keyword | @type choice1: string | @ivar choice1: first option choice | @type option2: string | @ivar option2: second option keyword | @type choice2: string | @ivar choice2: secondoption choice | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | ---------------------------------------------------------------------- | Data descriptors defined here: | | choice1 | choice1 | | choice2 | choice2 | | option1 | option1 | | option2 | option2 | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class Dest(__builtin__.object) | CUPS destination | ================ | | A destination print queue, as returned by L{Connection.getDests}. | | @type name: string | @ivar name: destination queue name | @type instance: string | @ivar instance: destination instance name | @type is_default: boolean | @ivar is_default: whether this is the default destination | @type options: dict | @ivar options: string:string dict of default options for this | destination, indexed by option name | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | __repr__(...) | x.__repr__() <==> repr(x) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | instance | instance | | is_default | is_default | | name | name | | options | options | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class Group(__builtin__.object) | PPD option group | ================ | | A PPD option group. | | @type text: string | @ivar text: user-presentable group name | @type name: string | @ivar name: unique group name | @type options: L{Option} list | @ivar options: list of options in the group | @type subgroups: L{Group} list | @ivar subgroups: list of subgroups in the group | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | __repr__(...) | x.__repr__() <==> repr(x) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | name | name | | options | options | | subgroups | subgroups | | text | text | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class HTTPError(exceptions.Exception) | This exception is raised when an HTTP problem has occurred. It | provides an integer HTTP status code. | | Use it like this:: | try: | ... | except cups.HTTPError (status): | print 'HTTP status is %d' % status | | Method resolution order: | HTTPError | exceptions.Exception | exceptions.BaseException | __builtin__.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from exceptions.Exception: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | ---------------------------------------------------------------------- | Data and other attributes inherited from exceptions.Exception: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T | | ---------------------------------------------------------------------- | Methods inherited from exceptions.BaseException: | | __delattr__(...) | x.__delattr__('name') <==> del x.name | | __getattribute__(...) | x.__getattribute__('name') <==> x.name | | __getitem__(...) | x.__getitem__(y) <==> x[y] | | __getslice__(...) | x.__getslice__(i, j) <==> x[i:j] | | Use of negative indices is not supported. | | __reduce__(...) | | __repr__(...) | x.__repr__() <==> repr(x) | | __setattr__(...) | x.__setattr__('name', value) <==> x.name = value | | __setstate__(...) | | __str__(...) | x.__str__() <==> str(x) | | ---------------------------------------------------------------------- | Data descriptors inherited from exceptions.BaseException: | | __dict__ | | args | | message | exception message class IPPError(exceptions.Exception) | This exception is raised when an IPP error has occurred. It | provides an integer IPP status code, and a human-readable string | describing the error. | | Use it like this:: | try: | ... | except cups.IPPError (status, description): | print 'IPP status is %d' % status | print 'Meaning:', description | | Method resolution order: | IPPError | exceptions.Exception | exceptions.BaseException | __builtin__.object | | Data descriptors defined here: | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Methods inherited from exceptions.Exception: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | ---------------------------------------------------------------------- | Data and other attributes inherited from exceptions.Exception: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T | | ---------------------------------------------------------------------- | Methods inherited from exceptions.BaseException: | | __delattr__(...) | x.__delattr__('name') <==> del x.name | | __getattribute__(...) | x.__getattribute__('name') <==> x.name | | __getitem__(...) | x.__getitem__(y) <==> x[y] | | __getslice__(...) | x.__getslice__(i, j) <==> x[i:j] | | Use of negative indices is not supported. | | __reduce__(...) | | __repr__(...) | x.__repr__() <==> repr(x) | | __setattr__(...) | x.__setattr__('name', value) <==> x.name = value | | __setstate__(...) | | __str__(...) | x.__str__() <==> str(x) | | ---------------------------------------------------------------------- | Data descriptors inherited from exceptions.BaseException: | | __dict__ | | args | | message | exception message class Option(__builtin__.object) | PPD option | ========== | A PPD option. | | @type conflicted: boolean | @ivar conflicted: whether this option is in conflict | @type keyword: string | @ivar keyword: the option keyword e.g. Duplex | @type defchoice: string | @ivar defchoice: the default option choice | @type text: string | @ivar text: the user-presentable option name e.g. Double-sided printing | @type ui: integer | @ivar ui: the option type; one of L{PPD_UI_BOOLEAN}, | L{PPD_UI_PICKONE}, L{PPD_UI_PICKMANY} | @type choices: list | @ivar choices: list of the option's choices | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | __repr__(...) | x.__repr__() <==> repr(x) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | choices | choices | | conflicted | Whether this option is in conflict | | defchoice | defchoice | | keyword | keyword | | text | text | | ui | ui | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T class PPD(__builtin__.object) | PPD file | ======== | A PPD file. | | @type constraints: L{Constraint} list | @ivar constraints: list of constraints | @type attributes: L{Attribute} list | @ivar attributes: list of attributes | @type optionGroups: L{Group} list | @ivar optionGroups: list of PPD option groups | | Methods defined here: | | __init__(...) | x.__init__(...) initializes x; see x.__class__.__doc__ for signature | | conflicts(...) | conflicts() -> integer | | @return: number of conflicts. | | findAttr(...) | findAttr(name) | | @type name: string | @param name: attribute name | @type spec: string | @keyword spec: specifier string (optional) | @rtype: L{Attribute} or None | @return: matching attribute, or None if not found. | | findNextAttr(...) | findNextAttr(name) | | @type name: string | @param name: attribute name | @type spec: string | @keyword spec: specifier string (optional) | @rtype: L{Attribute} or None | @return: next matching attribute, or None if not found. | | findOption(...) | findOption(name) | | @type name: string | @param name: option keyword | @rtype: L{Option} or None | @return: named option, or None if not found. | | localize(...) | localize() -> None | | Localize PPD to the current locale. | | localizeIPPReason(...) | localizeIPPReason(reason, scheme) -> string or None | | Localize IPP reason to the current locale. | | localizeMarkerName(...) | localizeMarkerName(name) -> string or None | | Localize marker name to the current locale. | | markDefaults(...) | markDefaults() -> None | | Set (mark) all options to their default choices. | | markOption(...) | markOption(option, choice) -> integer | | Set an option to a particular choice. | | @type option: string | @param option: option keyword | @type choice: string | @param choice: option choice | @return: number of conflicts | | nondefaultsMarked(...) | nondefaultsMarked() -> boolean | | Returns true if any non-default option choices are marked. | | writeFd(...) | writeFd(fd) -> None | | Write PPD file, with marked choices as defaults, to file | descriptor. | | @type fd: integer | @param fd: open file descriptor | | ---------------------------------------------------------------------- | Data descriptors defined here: | | attributes | List of attributes | | constraints | List of constraints | | optionGroups | List of PPD option groups | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = | T.__new__(S, ...) -> a new object with type S, a subtype of T FUNCTIONS getEncryption(...) getEncryption() -> integer Get encryption policy. @see: L{setEncryption} getPort(...) getPort() -> integer @return: IPP port to connect to. getServer(...) getServer() -> string @return: server to connect to. getUser(...) getUser() -> string @return: user to connect as. modelSort(...) modelSort(s1,s2) -> integer Sort two model strings. @type s1: string @param s1: first string @type s2: string @param s2: second string @return: strcmp-style comparision result require(...) require(version) -> None Require pycups version. @type version: string @param version: minimum pycups version required @raise RuntimeError: requirement not met setEncryption(...) setEncryption(policy) -> None Set encryption policy. @type policy: integer @param policy: L{HTTP_ENCRYPT_ALWAYS}, L{HTTP_ENCRYPT_IF_REQUESTED}, L{HTTP_ENCRYPT_NEVER}, or L{HTTP_ENCRYPT_REQUIRED} setPasswordCB(...) setPasswordCB(fn) -> None Set password callback function. This Python function will be called when a password is required. It must take one string parameter (the password prompt) and it must return a string (the password). To abort the operation it may return the empty string (''). @type fn: callable object @param fn: callback function setPort(...) setPort(port) -> None Set IPP port to connect to. @type port: integer @param port: IPP port setServer(...) setServer(server) -> None Set server to connect to. @type server: string @param server: server hostname setUser(...) setUser(user) -> None Set user to connect as. @type user: string @param user: username DATA CUPS_PRINTER_AUTHENTICATED = 4194304 CUPS_PRINTER_BIND = 1024 CUPS_PRINTER_BW = 4 CUPS_PRINTER_CLASS = 1 CUPS_PRINTER_COLLATE = 128 CUPS_PRINTER_COLOR = 8 CUPS_PRINTER_COMMANDS = 8388608 CUPS_PRINTER_COPIES = 64 CUPS_PRINTER_COVER = 512 CUPS_PRINTER_DEFAULT = 131072 CUPS_PRINTER_DELETE = 1048576 CUPS_PRINTER_DISCOVERED = 16777216 CUPS_PRINTER_DUPLEX = 16 CUPS_PRINTER_FAX = 262144 CUPS_PRINTER_IMPLICIT = 65536 CUPS_PRINTER_LARGE = 16384 CUPS_PRINTER_LOCAL = 0 CUPS_PRINTER_MEDIUM = 8192 CUPS_PRINTER_NOT_SHARED = 2097152 CUPS_PRINTER_OPTIONS = 458748 CUPS_PRINTER_PUNCH = 256 CUPS_PRINTER_REJECTING = 524288 CUPS_PRINTER_REMOTE = 2 CUPS_PRINTER_SMALL = 4096 CUPS_PRINTER_SORT = 2048 CUPS_PRINTER_STAPLE = 32 CUPS_PRINTER_VARIABLE = 32768 CUPS_SERVER_DEBUG_LOGGING = '_debug_logging' CUPS_SERVER_REMOTE_ADMIN = '_remote_admin' CUPS_SERVER_REMOTE_ANY = '_remote_any' CUPS_SERVER_REMOTE_PRINTERS = '_remote_printers' CUPS_SERVER_SHARE_PRINTERS = '_share_printers' CUPS_SERVER_USER_CANCEL_ANY = '_user_cancel_any' HTTP_BAD_REQUEST = 400 HTTP_ENCRYPT_ALWAYS = 3 HTTP_ENCRYPT_IF_REQUESTED = 0 HTTP_ENCRYPT_NEVER = 1 HTTP_ENCRYPT_REQUIRED = 2 HTTP_ERROR = -1 HTTP_FORBIDDEN = 403 HTTP_NOT_FOUND = 404 HTTP_OK = 200 HTTP_REQUEST_TIMEOUT = 408 HTTP_SERVER_ERROR = 500 HTTP_UNAUTHORIZED = 401 HTTP_UPGRADE_REQUIRED = 426 IPP_ATTRIBUTES = 1035 IPP_ATTRIBUTES_NOT_SETTABLE = 1043 IPP_BAD_REQUEST = 1024 IPP_CHARSET = 1037 IPP_COMPRESSION_ERROR = 1040 IPP_COMPRESSION_NOT_SUPPORTED = 1039 IPP_CONFLICT = 1038 IPP_DEVICE_ERROR = 1284 IPP_DOCUMENT_ACCESS_ERROR = 1042 IPP_DOCUMENT_FORMAT = 1034 IPP_DOCUMENT_FORMAT_ERROR = 1041 IPP_ERROR_JOB_CANCELLED = 1288 IPP_FINISHINGS_BALE = 12 IPP_FINISHINGS_BIND = 7 IPP_FINISHINGS_BIND_BOTTOM = 53 IPP_FINISHINGS_BIND_LEFT = 50 IPP_FINISHINGS_BIND_RIGHT = 52 IPP_FINISHINGS_BIND_TOP = 51 IPP_FINISHINGS_BOOKLET_MAKER = 13 IPP_FINISHINGS_COVER = 6 IPP_FINISHINGS_EDGE_STITCH = 9 IPP_FINISHINGS_EDGE_STITCH_BOTTOM = 27 IPP_FINISHINGS_EDGE_STITCH_LEFT = 24 IPP_FINISHINGS_EDGE_STITCH_RIGHT = 26 IPP_FINISHINGS_EDGE_STITCH_TOP = 25 IPP_FINISHINGS_FOLD = 10 IPP_FINISHINGS_JOB_OFFSET = 14 IPP_FINISHINGS_NONE = 3 IPP_FINISHINGS_PUNCH = 5 IPP_FINISHINGS_SADDLE_STITCH = 8 IPP_FINISHINGS_STAPLE = 4 IPP_FINISHINGS_STAPLE_BOTTOM_LEFT = 21 IPP_FINISHINGS_STAPLE_BOTTOM_RIGHT = 23 IPP_FINISHINGS_STAPLE_DUAL_BOTTOM = 31 IPP_FINISHINGS_STAPLE_DUAL_LEFT = 28 IPP_FINISHINGS_STAPLE_DUAL_RIGHT = 30 IPP_FINISHINGS_STAPLE_DUAL_TOP = 29 IPP_FINISHINGS_STAPLE_TOP_LEFT = 20 IPP_FINISHINGS_STAPLE_TOP_RIGHT = 22 IPP_FINISHINGS_TRIM = 11 IPP_FORBIDDEN = 1025 IPP_GONE = 1031 IPP_IGNORED_ALL_NOTIFICATIONS = 1046 IPP_IGNORED_ALL_SUBSCRIPTIONS = 1044 IPP_INTERNAL_ERROR = 1280 IPP_JOB_ABORTED = 8 IPP_JOB_CANCELED = 7 IPP_JOB_COMPLETED = 9 IPP_JOB_HELD = 4 IPP_JOB_PENDING = 3 IPP_JOB_PROCESSING = 5 IPP_JOB_STOPPED = 6 IPP_MAX_NAME = 256 IPP_MULTIPLE_JOBS_NOT_SUPPORTED = 1289 IPP_NOT_ACCEPTING = 1286 IPP_NOT_AUTHENTICATED = 1026 IPP_NOT_AUTHORIZED = 1027 IPP_NOT_FOUND = 1030 IPP_NOT_POSSIBLE = 1028 IPP_OK = 0 IPP_OK_BUT_CANCEL_SUBSCRIPTION = 6 IPP_OK_CONFLICT = 2 IPP_OK_EVENTS_COMPLETE = 7 IPP_OK_IGNORED_NOTIFICATIONS = 4 IPP_OK_IGNORED_SUBSCRIPTIONS = 3 IPP_OK_SUBST = 1 IPP_OK_TOO_MANY_EVENTS = 5 IPP_OPERATION_NOT_SUPPORTED = 1281 IPP_PRINTER_BUSY = 1287 IPP_PRINTER_IDLE = 3 IPP_PRINTER_IS_DEACTIVATED = 1290 IPP_PRINTER_PROCESSING = 4 IPP_PRINTER_STOPPED = 5 IPP_PRINT_SUPPORT_FILE_NOT_FOUND = 1047 IPP_REDIRECTION_OTHER_SITE = 512 IPP_REQUEST_ENTITY = 1032 IPP_REQUEST_VALUE = 1033 IPP_SERVICE_UNAVAILABLE = 1282 IPP_TEMPORARY_ERROR = 1285 IPP_TIMEOUT = 1029 IPP_TOO_MANY_SUBSCRIPTIONS = 1045 IPP_URI_SCHEME = 1036 IPP_VERSION_NOT_SUPPORTED = 1283 PPD_UI_BOOLEAN = 0 PPD_UI_PICKMANY = 2 PPD_UI_PICKONE = 1