def _get_patterns(installed_only=None):
 patterns = {}
 for element in __zypper__.nolock.xml.call('se', '-t', 'pattern').getElementsByTagName('solvable'):
  installed = (element.getAttribute('status') == 'installed')
  if ((installed_only and installed) or (not installed_only)):
   patterns[element.getAttribute('name')] = {'installed': installed, 'summary': element.getAttribute('summary')}
 return patterns

def _get_patterns ( installed_only = None ) : patterns = { } for element in __zypper__ . nolock . xml . call ( 'se' , '-t' , 'pattern' ) . getElementsByTagName ( 'solvable' ) : installed = ( element . getAttribute ( 'status' ) == 'installed' ) if ( ( installed_only and installed ) or ( not installed_only ) ) : patterns [ element . getAttribute ( 'name' ) ] = { 'installed' : installed , 'summary' : element . getAttribute ( 'summary' ) } return patterns
list all known patterns in repos .