def is_python_interpreter_valid_name(filename):
 pattern = '.*python(\\d\\.?\\d*)?(w)?(.exe)?$'
 if (re.match(pattern, filename, flags=re.I) is None):
  return False
 else:
  return True

def is_python_interpreter_valid_name ( filename ) : pattern = '.*python(\\d\\.?\\d*)?(w)?(.exe)?$' if ( re . match ( pattern , filename , flags = re . I ) is None ) : return False else : return True
check that the python interpreter file has a valid name .