當前位置: 首頁>>代碼示例>>Python>>正文


Python AptWorker.remove_packages方法代碼示例

本文整理匯總了Python中ubuntutweak.utils.package.AptWorker.remove_packages方法的典型用法代碼示例。如果您正苦於以下問題:Python AptWorker.remove_packages方法的具體用法?Python AptWorker.remove_packages怎麽用?Python AptWorker.remove_packages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ubuntutweak.utils.package.AptWorker的用法示例。


在下文中一共展示了AptWorker.remove_packages方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: do_action_for_app

# 需要導入模塊: from ubuntutweak.utils.package import AptWorker [as 別名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 別名]
    def do_action_for_app(self, pkgname, action_id, *args):
        action_id = int(action_id)

        if action_id == self.INSTALL_ACTION:
            set_busy(self)
            worker = AptWorker(self.get_toplevel(),
                               finish_handler=self.on_package_work_finished,
                               data={'parent': self})
            worker.install_packages([pkgname])

            self.update_action_button(self.INSTALLING_ACTION)
        elif action_id == self.UNINSTALL_ACTION:
            set_busy(self)
            worker = AptWorker(self.get_toplevel(),
                               finish_handler=self.on_package_work_finished,
                               data={'parent': self})
            worker.remove_packages([pkgname])

            self.update_action_button(self.UNINSTALLING_ACTION)
        elif action_id == self.UPDATE_ACTION:
            set_busy(self)
            worker = AptWorker(self.get_toplevel(),
                               finish_handler=self.on_update_work_finished,
                               data={'parent': self})
            worker.update_cache()
            self.update_action_button(self.UPDATING_ACTION)
開發者ID:billy3321,項目名稱:ubuntu-tweak,代碼行數:28,代碼來源:__init__.py

示例2: clean_cruft

# 需要導入模塊: from ubuntutweak.utils.package import AptWorker [as 別名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 別名]
 def clean_cruft(self, parent=None, cruft_list=[]):
     set_busy(parent)
     worker = AptWorker(parent,
                        finish_handler=self.on_clean_finished,
                        error_handler=self.on_error,
                        data=parent)
     worker.remove_packages([cruft.get_package_name() for cruft in cruft_list])
開發者ID:0tli4nitsa,項目名稱:ubuntu-tweak,代碼行數:9,代碼來源:autoremoval_plugin.py

示例3: on_install_finished

# 需要導入模塊: from ubuntutweak.utils.package import AptWorker [as 別名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 別名]
 def on_install_finished(transaction, status, kwargs):
     to_add, to_rm = kwargs['add_and_rm']
     if to_rm:
         worker = AptWorker(self.get_toplevel(),
                            finish_handler=self.on_package_work_finished,
                            data=kwargs)
         worker.remove_packages(to_rm)
     else:
        self.on_package_work_finished(None, None, kwargs)
開發者ID:c326277320,項目名稱:ubuntu-tweak,代碼行數:11,代碼來源:appcenter.py

示例4: clean_cruft

# 需要導入模塊: from ubuntutweak.utils.package import AptWorker [as 別名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 別名]
 def clean_cruft(self, parent, cruft_list):
     set_busy(parent)
     worker = AptWorker(parent, self.on_clean_finished, parent)
     worker.remove_packages([cruft.get_package_name() for cruft in cruft_list])
開發者ID:Thongor,項目名稱:ubuntu-tweak,代碼行數:6,代碼來源:oldkernel_plugin.py

示例5: on_clean_finished

# 需要導入模塊: from ubuntutweak.utils.package import AptWorker [as 別名]
# 或者: from ubuntutweak.utils.package.AptWorker import remove_packages [as 別名]
 def on_clean_finished(transaction, status, add_and_rm):
     to_add, to_rm = add_and_rm
     worker = AptWorker(self.get_toplevel(), self.on_package_work_finished, add_and_rm)
     worker.remove_packages(to_rm)
開發者ID:nayanapriyankara,項目名稱:ubuntu-tweak,代碼行數:6,代碼來源:appcenter.py


注:本文中的ubuntutweak.utils.package.AptWorker.remove_packages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。