X7ROOT File Manager
Current Path:
/usr/share/system-config-printer
usr
/
share
/
system-config-printer
/
📁
..
📄
HIG.py
(57 B)
📄
HIG.pyc
(231 B)
📄
HIG.pyo
(231 B)
📄
PhysicalDevice.py
(10.69 KB)
📄
PhysicalDevice.pyc
(7.72 KB)
📄
PhysicalDevice.pyo
(7.72 KB)
📄
SearchCriterion.py
(1.32 KB)
📄
SearchCriterion.pyc
(982 B)
📄
SearchCriterion.pyo
(982 B)
📄
ToolbarSearchEntry.py
(6.91 KB)
📄
ToolbarSearchEntry.pyc
(6.43 KB)
📄
ToolbarSearchEntry.pyo
(6.43 KB)
📄
applet.py
(15.71 KB)
📄
applet.pyc
(14.03 KB)
📄
applet.pyo
(14.03 KB)
📄
asyncconn.py
(9.63 KB)
📄
asyncconn.pyc
(9.8 KB)
📄
asyncconn.pyo
(9.8 KB)
📄
asyncipp.py
(26.02 KB)
📄
asyncipp.pyc
(20.5 KB)
📄
asyncipp.pyo
(20.5 KB)
📄
asyncpk1.py
(25.68 KB)
📄
asyncpk1.pyc
(20.4 KB)
📄
asyncpk1.pyo
(20.4 KB)
📄
authconn.py
(18.34 KB)
📄
authconn.pyc
(15.74 KB)
📄
authconn.pyo
(15.74 KB)
📄
check-device-ids.py
(10.9 KB)
📄
check-device-ids.pyc
(8.13 KB)
📄
check-device-ids.pyo
(8.13 KB)
📄
config.py
(1.05 KB)
📄
config.pyc
(370 B)
📄
config.pyo
(370 B)
📄
cupspk.py
(27.35 KB)
📄
cupspk.pyc
(18.01 KB)
📄
cupspk.pyo
(18.01 KB)
📄
debug.py
(1.62 KB)
📄
debug.pyc
(1.55 KB)
📄
debug.pyo
(1.55 KB)
📄
dnssdresolve.py
(4.91 KB)
📄
dnssdresolve.pyc
(5.17 KB)
📄
dnssdresolve.pyo
(5.17 KB)
📄
errordialogs.py
(3.13 KB)
📄
errordialogs.pyc
(2.57 KB)
📄
errordialogs.pyo
(2.57 KB)
📄
firewallsettings.py
(9.25 KB)
📄
firewallsettings.pyc
(8.69 KB)
📄
firewallsettings.pyo
(8.69 KB)
📄
gtkinklevel.py
(4.71 KB)
📄
gtkinklevel.pyc
(4.18 KB)
📄
gtkinklevel.pyo
(4.18 KB)
📄
gui.py
(2.12 KB)
📄
gui.pyc
(1.76 KB)
📄
gui.pyo
(1.76 KB)
📁
icons
📄
install-printerdriver.py
(2.82 KB)
📄
install-printerdriver.pyc
(2.42 KB)
📄
install-printerdriver.pyo
(2.42 KB)
📄
installpackage.py
(1.34 KB)
📄
installpackage.pyc
(1.1 KB)
📄
installpackage.pyo
(1.1 KB)
📄
jobviewer.py
(91.15 KB)
📄
jobviewer.pyc
(64.36 KB)
📄
jobviewer.pyo
(64.36 KB)
📄
monitor.py
(31.96 KB)
📄
monitor.pyc
(23 KB)
📄
monitor.pyo
(23 KB)
📄
newprinter.py
(164.81 KB)
📄
newprinter.pyc
(102.42 KB)
📄
newprinter.pyo
(102.42 KB)
📄
options.py
(18.73 KB)
📄
options.pyc
(16.57 KB)
📄
options.pyo
(16.57 KB)
📄
optionwidgets.py
(8.78 KB)
📄
optionwidgets.pyc
(7.94 KB)
📄
optionwidgets.pyo
(7.94 KB)
📄
ppdcache.py
(7.41 KB)
📄
ppdcache.pyc
(6.1 KB)
📄
ppdcache.pyo
(6.1 KB)
📄
ppdippstr.py
(7.15 KB)
📄
ppdippstr.pyc
(5.64 KB)
📄
ppdippstr.pyo
(5.64 KB)
📄
ppdsloader.py
(10.78 KB)
📄
ppdsloader.pyc
(10.22 KB)
📄
ppdsloader.pyo
(10.22 KB)
📄
printerproperties.py
(78.52 KB)
📄
printerproperties.pyc
(51.48 KB)
📄
printerproperties.pyo
(51.48 KB)
📄
probe_printer.py
(15.24 KB)
📄
probe_printer.pyc
(13.82 KB)
📄
probe_printer.pyo
(13.82 KB)
📄
pysmb.py
(6.8 KB)
📄
pysmb.pyc
(5.47 KB)
📄
pysmb.pyo
(5.47 KB)
📄
scp-dbus-service.py
(19.04 KB)
📄
scp-dbus-service.pyc
(21.34 KB)
📄
scp-dbus-service.pyo
(21.34 KB)
📄
serversettings.py
(21.4 KB)
📄
serversettings.pyc
(16.15 KB)
📄
serversettings.pyo
(16.15 KB)
📄
smburi.py
(3.22 KB)
📄
smburi.pyc
(2.61 KB)
📄
smburi.pyo
(2.61 KB)
📄
statereason.py
(6.09 KB)
📄
statereason.pyc
(5.02 KB)
📄
statereason.pyo
(5.02 KB)
📄
system-config-printer.py
(80.8 KB)
📄
system-config-printer.pyc
(57.95 KB)
📄
system-config-printer.pyo
(57.95 KB)
📄
timedops.py
(8 KB)
📄
timedops.pyc
(8 KB)
📄
timedops.pyo
(8 KB)
📁
troubleshoot
📁
ui
📄
userdefault.py
(6.12 KB)
📄
userdefault.pyc
(5.34 KB)
📄
userdefault.pyo
(5.34 KB)
📁
xml
Editing: install-printerdriver.py
#!/usr/bin/python from gi.repository import GLib, PackageKitGlib import sys # progress callback # http://www.packagekit.org/gtk-doc/PkProgress.html def progress(progress, type, user_data): if (type.value_name == "PK_PROGRESS_TYPE_PERCENTAGE" and progress.props.package != None): sys.stderr.write ("%d\n" % progress.props.percentage) sys.stderr.flush () package = sys.argv[1] repo = sys.argv[2] try: repo_gpg_id = sys.argv[3] except: repo_gpg_id = None # get PackageKit client pk = PackageKitGlib.Client() # check if we already have the package installed or available try: res = pk.resolve(PackageKitGlib.FilterEnum.NONE, [package], None, lambda p, t, d: True, None) except GLib.GError: # cannot resolve, so we need to install the key and repo # install repository key if repo_gpg_id: try: res = pk.install_signature(PackageKitGlib.SigTypeEnum.GPG, repo_gpg_id, '', None, progress, None) except GLib.GError: sys.exit(1) if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS: sys.exit(1) # add repository; see # http://www.packagekit.org/gtk-doc/PackageKit-pk-client-sync.html#pk-client-repo-enable try: res = pk.repo_enable(repo, True, None, progress, None) except GLib.GError: sys.exit(1) if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS: sys.exit(1) # download/update the indexes try: res = pk.refresh_cache(False, None, progress, None) except GLib.GError: sys.exit(1) if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS: sys.exit(1) # map package name to PackageKit ID; do not print progress here, it's fast try: res = pk.resolve(PackageKitGlib.FilterEnum.NONE, [package], None, lambda p, t, d: True, None) except GLib.GError: sys.exit(1) if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS: sys.exit(1) package_ids = res.get_package_array() if len(package_ids) <= 0: sys.exit(1) package_id = package_ids[0].get_id() # install the first match, unless already installed if package_ids[0].get_info() & PackageKitGlib.InfoEnum.INSTALLED == 0: # install package try: res = pk.install_packages(True, [package_id], None, progress, None) except GLib.GError: sys.exit(1) if res.get_exit_code() != PackageKitGlib.ExitEnum.SUCCESS: sys.exit(1) # If we reach this point, the requested package is on the system, either # because we have installed it now or because it was already there # Return the list of files contained in the package try: res = pk.get_files([package_id], None, progress, None) except GLib.GError: pass files = res.get_files_array() if files: for f in files[0].get_property('files'): print f
Upload File
Create Folder