parameters: (compiler)
return_statement: return compiler
docstring: Determine the name + version of the compiler
docstring_summary: Determine the name + version of the compiler
docstring_tokens: Determine the name + version of the compiler
function: def compiler_info(compiler):
      """Determine the name + version of the compiler"""
      (out, err) = subprocess.Popen(
          ['/bin/sh', '-c', '{0} -v'.format(compiler)],
          stdin=subprocess.PIPE,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE
      ).communicate('')
  
      gcc_clang = re.compile('(gcc|clang) version ([0-9]+(\\.[0-9]+)*)')
  
      for line in (out + err).split('\n'):
          mtch = gcc_clang.search(line)
          if mtch:
              return mtch.group(1) + ' ' + mtch.group(2)
  
      return compiler
function_tokens: def compiler_info ( compiler ) : ( out , err ) = subprocess . Popen ( [ '/bin/sh' , '-c' , '{0} -v' . format ( compiler ) ] , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( '' ) gcc_clang = re . compile ( '(gcc|clang) version ([0-9]+(\\.[0-9]+)*)' ) for line in ( out + err ) . split ( '\n' ) : mtch = gcc_clang . search ( line ) if mtch : return mtch . group ( 1 ) + ' ' + mtch . group ( 2 ) return compiler