| 1 |
## system-config-printer |
| 2 |
|
| 3 |
## Copyright (C) 2008, 2011 Red Hat, Inc. |
| 4 |
## Authors: |
| 5 |
## Tim Waugh <[email protected]> |
| 6 |
|
| 7 |
## This program is free software; you can redistribute it and/or modify |
| 8 |
## it under the terms of the GNU General Public License as published by |
| 9 |
## the Free Software Foundation; either version 2 of the License, or |
| 10 |
## (at your option) any later version. |
| 11 |
|
| 12 |
## This program is distributed in the hope that it will be useful, |
| 13 |
## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
## GNU General Public License for more details. |
| 16 |
|
| 17 |
## You should have received a copy of the GNU General Public License |
| 18 |
## along with this program; if not, write to the Free Software |
| 19 |
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 20 |
|
| 21 |
__all__ = ['set_debugprint_fn', |
| 22 |
'Device', 'Printer', 'activateNewPrinter', |
| 23 |
'copyPPDOptions', 'getDevices', 'getPrinters', |
| 24 |
'missingPackagesAndExecutables', 'missingExecutables', |
| 25 |
'parseDeviceID', |
| 26 |
'setPPDPageSize', |
| 27 |
'ppds', |
| 28 |
'openprinting'] |
| 29 |
|
| 30 |
def _no_debug (x): |
| 31 |
return |
| 32 |
|
| 33 |
_debugprint_fn = _no_debug |
| 34 |
def _debugprint (x): |
| 35 |
_debugprint_fn (x) |
| 36 |
|
| 37 |
def set_debugprint_fn (debugprint): |
| 38 |
""" |
| 39 |
Set debugging hook. |
| 40 |
|
| 41 |
@param debugprint: function to print debug output |
| 42 |
@type debugprint: fn (str) -> None |
| 43 |
""" |
| 44 |
global _debugprint_fn |
| 45 |
_debugprint_fn = debugprint |
| 46 |
|
| 47 |
from .cupshelpers import \ |
| 48 |
Device, \ |
| 49 |
Printer, \ |
| 50 |
activateNewPrinter, \ |
| 51 |
copyPPDOptions, \ |
| 52 |
getDevices, \ |
| 53 |
getPrinters, \ |
| 54 |
missingPackagesAndExecutables, \ |
| 55 |
missingExecutables, \ |
| 56 |
parseDeviceID, \ |
| 57 |
setPPDPageSize |
| 58 |
|
| 59 |
from . import ppds |
| 60 |
from . import openprinting |