def _module_versions():
 lines = []
 modules = collections.OrderedDict([('sip', ['SIP_VERSION_STR']), ('colorama', ['VERSION', '__version__']), ('pypeg2', ['__version__']), ('jinja2', ['__version__']), ('pygments', ['__version__']), ('yaml', ['__version__']), ('cssutils', ['__version__']), ('typing', []), ('PyQt5.QtWebEngineWidgets', [])])
 for (name, attributes) in modules.items():
  try:
   module = importlib.import_module(name)
  except ImportError:
   text = '{}: no'.format(name)
  else:
   for attr in attributes:
    try:
     text = '{}: {}'.format(name, getattr(module, attr))
    except AttributeError:
     pass
    else:
     break
   else:
    text = '{}: yes'.format(name)
  lines.append(text)
 return lines

def _module_versions ( ) : lines = [ ] modules = collections . OrderedDict ( [ ( 'sip' , [ 'SIP_VERSION_STR' ] ) , ( 'colorama' , [ 'VERSION' , '__version__' ] ) , ( 'pypeg2' , [ '__version__' ] ) , ( 'jinja2' , [ '__version__' ] ) , ( 'pygments' , [ '__version__' ] ) , ( 'yaml' , [ '__version__' ] ) , ( 'cssutils' , [ '__version__' ] ) , ( 'typing' , [ ] ) , ( 'PyQt5.QtWebEngineWidgets' , [ ] ) ] ) for ( name , attributes ) in modules . items ( ) : try : module = importlib . import_module ( name ) except ImportError : text = '{}: no' . format ( name ) else : for attr in attributes : try : text = '{}: {}' . format ( name , getattr ( module , attr ) ) except AttributeError : pass else : break else : text = '{}: yes' . format ( name ) lines . append ( text ) return lines
get versions of optional modules .