Back to index

system-config-printer  1.3.9+20120706
__init__.py
Go to the documentation of this file.
00001 ## system-config-printer
00002 
00003 ## Copyright (C) 2008, 2011 Red Hat, Inc.
00004 ## Authors:
00005 ##  Tim Waugh <twaugh@redhat.com>
00006 
00007 ## This program is free software; you can redistribute it and/or modify
00008 ## it under the terms of the GNU General Public License as published by
00009 ## the Free Software Foundation; either version 2 of the License, or
00010 ## (at your option) any later version.
00011 
00012 ## This program is distributed in the hope that it will be useful,
00013 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 ## GNU General Public License for more details.
00016 
00017 ## You should have received a copy of the GNU General Public License
00018 ## along with this program; if not, write to the Free Software
00019 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00020 
00021 __all__  = ['set_debugprint_fn',
00022             'Device', 'Printer', 'activateNewPrinter',
00023             'copyPPDOptions', 'getDevices', 'getPrinters',
00024             'missingPackagesAndExecutables', 'missingExecutables',
00025             'parseDeviceID',
00026             'setPPDPageSize',
00027             'ppds',
00028             'openprinting']
00029 
00030 def _no_debug (x):
00031     return
00032 
00033 _debugprint_fn = _no_debug
00034 def _debugprint (x):
00035     _debugprint_fn (x)
00036 
00037 def set_debugprint_fn (debugprint):
00038     """
00039     Set debugging hook.
00040 
00041     @param debugprint: function to print debug output
00042     @type debugprint: fn (str) -> None
00043     """
00044     global _debugprint_fn
00045     _debugprint_fn = debugprint
00046 
00047 from cupshelpers import                          \
00048     Device,                               \
00049     Printer,                              \
00050     activateNewPrinter,                          \
00051     copyPPDOptions,                       \
00052     getDevices,                                  \
00053     getPrinters,                          \
00054     missingPackagesAndExecutables,        \
00055     missingExecutables,                         \
00056     parseDeviceID,                        \
00057     setPPDPageSize
00058 
00059 import ppds
00060 import openprinting