def CCompiler_get_version(self, force=False, ok_status=[<NUM_LIT:0>]):
if not force and hasattr(self, '<STR_LIT:version>'):<EOL><INDENT>return self.version<EOL><DEDENT>self.find_executables()<EOL>try:<EOL><INDENT>version_cmd = self.version_cmd<EOL><DEDENT>except AttributeError:<EOL><INDENT>return None<EOL><DEDENT>if not version_cmd or not version_cmd[<NUM_LIT:0>]:<EOL><INDENT>return None<EOL><DEDENT>try:<EOL><INDENT>matcher = self.version_match<EOL><DEDENT>except AttributeError:<EOL><INDENT>try:<EOL><INDENT>pat = self.version_pattern<EOL><DEDENT>except AttributeError:<EOL><INDENT>return None<EOL><DEDENT>def matcher(version_string):<EOL><INDENT>m = re.match(pat, version_string)<EOL>if not m:<EOL><INDENT>return None<EOL><DEDENT>version = m.group('<STR_LIT:version>')<EOL>return version<EOL><DEDENT><DEDENT>status, output = exec_command(version_cmd, use_tee=<NUM_LIT:0>)<EOL>version = None<EOL>if status in ok_status:<EOL><INDENT>version = matcher(output)<EOL>if version:<EOL><INDENT>version = LooseVersion(version)<EOL><DEDENT><DEDENT>self.version = version<EOL>return version<EOL>
Return compiler version, or None if compiler is not available.

Parameters
----------
force : bool, optional
    If True, force a new determination of the version, even if the
    compiler already has a version attribute. Default is False.
ok_status : list of int, optional
    The list of status values returned by the version look-up process
    for which a version string is returned. If the status value is not
    in `ok_status`, None is returned. Default is ``[0]``.

Returns
-------
version : str or None
    Version string, in the format of `distutils.version.LooseVersion`.