Пример #1
0
 def show_installed_packages(self):
     try:
         tabby.tabby_print(
             self.reader.get_installed_packages(),
             headings=['PACKAGE']
     )
     except ValueError:
         print('You have no packages installed')
Пример #2
0
 def show_packages(self, package_type=''):
     """Prints all packages of a given type (all if not specified).
     Output is also formatted"""
     if package_type:
         for package in self.reader.filter_where('type', package_type):
             print(package)
     else:
         tabby.tabby_print(self.reader.get_properties('name'),
                           self.reader.get_properties('type'),
                           self.reader.get_properties('os'),
                           self.reader.get_properties('nicesize'),
                           headings=['PACKAGE', 'TYPE', 'OS', 'SIZE'])
Пример #3
0
 def show_packages(self, package_type=''):
     """Prints all packages of a given type (all if not specified).
     Output is also formatted"""
     if package_type:
         for package in self.reader.filter_where('type', package_type):
             print(package)
     else:
         tabby.tabby_print(
             self.reader.get_properties('name'),
             self.reader.get_properties('type'),
             self.reader.get_properties('os'),
             self.reader.get_properties('nicesize'),
             headings=['PACKAGE', 'TYPE', 'OS', 'SIZE']
         )
Пример #4
0
 def show_installed_packages(self):
     try:
         tabby.tabby_print(self.reader.get_installed_packages(),
                           headings=['PACKAGE'])
     except ValueError:
         print('You have no packages installed')