def IsPythonVersionCorrect(path):
 from ycmd import utils
 if (not EndsWithPython(path)):
  return False
 command = [path, u'-S', u'-c', u'import sys;major, minor = sys.version_info[ :2 ];good_python = ( major == 2 and minor >= 6 ) or ( major == 3 and minor >= 3 ) or major > 3;sys.exit( not good_python )']
 return (utils.SafePopen(command).wait() == 0)

def IsPythonVersionCorrect ( path ) : from ycmd import utils if ( not EndsWithPython ( path ) ) : return False command = [ path , u'-S' , u'-c' , u'import sys;major, minor = sys.version_info[ :2 ];good_python = ( major == 2 and minor >= 6 ) or ( major == 3 and minor >= 3 ) or major > 3;sys.exit( not good_python )' ] return ( utils . SafePopen ( command ) . wait ( ) == 0 )
check if given path is the python interpreter version 2 .