Package x2go :: Module printqueue
[frames] | no frames]

Module printqueue

source code

X2GoPrintQueue sets up a thread that listens for incoming print jobs.

For each incoming print job in an X2Go session's spool directory an individual thread is started (X2GoPrintJob) that handles the processing of the incoming print job.

Classes
  X2GoPrintQueue
If X2Go printing is supported in a particular X2GoSession instance this class provides a sub-thread for handling incoming X2Go print jobs.
  X2GoPrintJob
For each X2Go print job we create a sub-thread that let's the print job be processed in the background.
Functions
 
x2go_printjob_handler(job_file=None, pdf_file=None, job_title=None, print_action=None, parent_thread=None, logger=None)
This function is called as a handler function for each incoming X2Go print job represented by the class X2GoPrintJob.
source code
Variables
  __NAME__ = 'x2goprintqueue-pylib'
Function Details

x2go_printjob_handler(job_file=None, pdf_file=None, job_title=None, print_action=None, parent_thread=None, logger=None)

source code 

This function is called as a handler function for each incoming X2Go print job represented by the class X2GoPrintJob.

The handler function will (re-)read the »printing« configuration file (if no explicit print_action is passed to this function...). It then will execute the <print_action>.do_print() command.

Parameters:
  • pdf_file (str) - PDF file name as placed in to the X2Go spool directory
  • job_title (str) - human readable print job title
  • print_action (X2GoPrintActionXXX nstance) - an instance of either of the possible X2GoPrintActionXXX classes
  • parent_thread (obj) - the X2GoPrintQueue thread that actually created this handler's X2GoPrintJob instance
  • logger (obj) - the X2GoPrintQueue's logging instance