iface.NewPrinterFromDevice (0, device_uri, device_id) loop.run () if __name__ == '__main__': import ppdippstr import config import gettext gettext.install(domain=config.PACKAGE, localedir=config.localedir) import locale try: locale.setlocale (locale.LC_ALL, "") except: pass ppdippstr.init () Gdk.threads_init () from dbus.glib import DBusGMainLoop DBusGMainLoop (set_as_default=True) client_demo = False if len (sys.argv) > 1: for opt in sys.argv[1:]: if opt == "--debug": set_debugging (True) cupshelpers.set_debugprint_fn (debugprint) elif opt == "--client": client_demo = True if client_demo: _client_demo ()
loop.run() if __name__ == '__main__': import ppdippstr import config import gettext gettext.install(domain=config.PACKAGE, localedir=config.localedir) import locale try: locale.setlocale(locale.LC_ALL, "") except: pass ppdippstr.init() Gdk.threads_init() from dbus.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) client_demo = False if len(sys.argv) > 1: for opt in sys.argv[1:]: if opt == "--debug": set_debugging(True) cupshelpers.set_debugprint_fn(debugprint) elif opt == "--client": client_demo = True if client_demo: _client_demo()