gtkunixprint.Printeran object representing a print in Unix (new in PyGTK
2.10)Synopsisgtkunixprint.Printergobject.GObjectget_nameget_state_messageget_capabilitiesget_descriptionget_locationget_icon_nameget_job_counthas_detailsrequest_detailsis_accepting_jobsis_activeis_defaultis_pausedis_virtualcomparebaccepts_pdfaccepts_psAncestry+-- gobject.GObject
+-- gtkunixprint.Printer
gtkunixprint.Printer Properties
"accepting-jobs"ReadThis property is True if the printer
is accepting jobs. Default value: True.
Available in GTK+ 2.14."accepts-ps"Read-Write-Construct Onlyif True this printer can accept
PostScript. Available in GTK+ 2.10."accepts-ps"Read-Write-Construct Onlyif True this printer can accept
PostScript. Available in GTK+ 2.10."backend"Read-Write-Construct OnlyThe backend for the printer. Not currently useful in
PyGTK. Available in GTK+ 2.10."icon-name"ReadThe icon name to use for the printer. Default value:
None. Available in GTK+ 2.10."is-virtual"Read-Writeif False this represents a real
hardware printer. Default value:
False. Available in GTK+ 2.10."job-count"ReadThe number of jobs queued in the printer. Allowed
values: >= 0. Default value: 0. Available in GTK+
2.10."location"ReadThe location of the printer. Default value:
None. Available in GTK+ 2.10."name"Read-Write-Construct OnlyThe name of the printer. Default value:
None. Available in GTK+ 2.10."paused"ReadThis property is True if this printer is paused. A paused
printer still accepts jobs, but it does not print them.
Default value: False
Available in GTK+ 2.14."state-message"ReadA string giving the current state of the printer.
Default value: None. Available in GTK+
2.10.
gtkunixprint.Printer Signal Prototypesgobject.GObject Signal Prototypes"details-acquired"callbackprintersuccessuser_param1...DescriptionThis class is available in PyGTK 2.10 and above.A gtkunixprint.Printer
object represents a printer. You only need to deal directly with
printers if you use the non-portable gtkunixprint.PrintUnixDialog
API.A gtkunixprint.Printer
allows you to get status information about the printer, such as its
description, its location, the number of queued jobs, etc. Most
importantly, a gtkunixprint.Printer
object can be used to create a gtkunixprint.PrintJob
object, that lets you print to the printer.Methodsgtkunixprint.Printer.get_nameget_nameReturns :the name of the printerThis method is available in PyGTK 2.10 and above.The get_name() method returns the name
of the printer.gtkunixprint.Printer.get_state_messageget_state_messageReturns :the state message of the
printerThis method is available in PyGTK 2.10 and above.The get_state_message() method returns
the state message describing the current state of the printer.gtkunixprint.Printer.get_descriptionget_descriptionReturns :the description of the
printerThis method is available in PyGTK 2.10 and above.The get_description() method returns
the description of the printer.gtkunixprint.Printer.get_capabilitiesget_capabilitiesReturns :the printer's capabilities.This method is available in PyGTK 2.12 and above.The get_capabilities() method returns
the printer's capabilities.This is useful when you're using GtkPrintUnixDialog's
manual-capabilities setting and need to know which settings the
printer can handle and which you must handle yourself.This will return 0 unless the printer's details are available,
see gtkunixprint.Printer.has_details()
and gtkunixprint.Printer.request_details().
gtkunixprint.Printer.get_locationget_locationReturns :the location of the printerThis method is available in PyGTK 2.10 and above.The get_location() method returns a
description of the location of the printer.gtkunixprint.Printer.get_icon_nameget_icon_nameReturns :the icon name for the printerThis method is available in PyGTK 2.10 and above.The get_icon_name() method returns the
name of the icon to use for the printer.gtkunixprint.Printer.get_job_countget_job_countReturns :the number of jobs on the printerThis method is available in PyGTK 2.10 and above.The get_job_count() method returns the
number of jobs currently queued on the printer.gtkunixprint.Printer.has_detailshas_detailsReturns :True if printer details
are availableThis method is available in PyGTK 2.12 and above.The has_details() method returns
whether the printer details are available.gtkunixprint.Printer.request_detailsrequest_detailsThis method is available in PyGTK 2.12 and above.The request_details() method requests
the printer details. When the details are available,
the GtkPrinter::details-acquired signal will be emitted on printer.gtkunixprint.Printer.is_accepting_jobsis_accepting_jobsReturns :True if printer is accepting jobs.This method is available in PyGTK 2.14 and above.The is_accepting_jobs() method returns
whether the printer is accepting jobsgtkunixprint.Printer.is_activeis_activeReturns :True if the printer is activeThis method is available in PyGTK 2.10 and above.The is_active() method returns
True if the printer is currently active (i.e.
accepts new jobs).gtkunixprint.Printer.is_pausedis_pausedReturns :True if the printer is paused.This method is available in PyGTK 2.14 and above.The is_paused() method returns
whether the printer is currently paused. A paused printer still accepts
jobs, but it is not printing them.gtkunixprint.Printer.is_virtualis_virtualReturns :True if the printer is
virtualThis method is available in PyGTK 2.10 and above.The is_virtual() method returns
True if the printer is virtual (i.e. does not
represent actual printer hardware, but something like a CUPS
class).gtkunixprint.Printer.is_defaultis_defaultReturns :True if the printer is the defaultThis method is available in PyGTK 2.10 and above.The is_default() method returns
True if the printer is the default printer.gtkunixprint.Printer.comparecomparebb :a gtkunixprint.PrinterReturns :an integer indicating the result of the
comparison of the gtkunixprint.Printer
names.This method is available in PyGTK 2.10 and above.The compare() method compares the name of the printer to the
name of the gtkunixprint.Printer
specified by b and returns:a negative integer if the name of the printer is less than
the name of b.a negative integer if the name of the printer is the same as
the name of b.a positive integer if the name of the printer is greater
than the name of b.gtkunixprint.Printer.accepts_pdfaccepts_pdfReturns :True if the printer accepts
PDFThis method is available in PyGTK 2.10 and above.Returns whether the printer accepts input in PDF format.gtkunixprint.Printer.accepts_psaccepts_psReturns :True if the printer accepts
PostScriptThis method is available in PyGTK 2.10 and above.Returns whether the printer accepts input in PostScript
format.SignalsThe "details-acquired" Signalcallbackprintersuccessuser_param1...printer :the printer that received the
signalsuccess :True if the details were
successfully acquireduser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in GTK+ 2.10 and above.The "details-acquired" signal is emitted in response to a
request for detailed information about a printer from the print
backend. The success parameter indicates if the information was
actually obtained.