original_docstring: 
          Lists the available iPOPO component factories
          
docstring: Lists the available iPOPO component factories
docstring_tokens: Lists the available iPOPO component factories
code: def list_factories(self, session, name=None):
          """
          Lists the available iPOPO component factories
          """
          header = ("Factory", "Bundle")
  
          factories = self._ipopo.get_factories()
          if name is not None:
              # Filter factories by name
              factories = [factory for factory in factories if name in factory]
  
          lines = sorted(
              (name, self._ipopo.get_factory_bundle(name)) for name in factories
          )
  
          session.write(self._utils.make_table(header, lines))
          if name is None:
              session.write_line("{0} factories available", len(lines))
          else:
              session.write_line("{0} filtered factories", len(lines))
code_tokens: def list_factories ( self , session , name = None ) : header = ( "Factory" , "Bundle" ) factories = self . _ipopo . get_factories ( ) if name is not None : factories = [ factory for factory in factories if name in factory ] lines = sorted ( ( name , self . _ipopo . get_factory_bundle ( name ) ) for name in factories ) session . write ( self . _utils . make_table ( header , lines ) ) if name is None : session . write_line ( "{0} factories available" , len ( lines ) ) else : session . write_line ( "{0} filtered factories" , len ( lines ) )
short_docstring: Lists the available iPOPO component factories
short_docstring_tokens: Lists the available iPOPO component factories
comment: """
          Lists the available iPOPO component factories
          """$SEP$# Filter factories by name