Checks the python version, exists if != 2.7.
355209
def check_python_version():
    """"""
    python_major, python_minor = sys.version_info[:2]

    if python_major != 2 or python_minor != 7:
        sys.stderr.write("pyGenClean requires python 2.7")
        sys.exit(1)
513330
function isVersionAtLeast(dottedVersion, major, minor, patch){
	var i, v, t,
		verParts = $.map($.trim(dottedVersion).split("."), function(e){ return parseInt(e, 10); }),
		testParts = $.map(Array.prototype.slice.call(arguments, 1), function(e){ return parseInt(e, 10); });

	for( i = 0; i < testParts.length; i++ ){
		v = verParts[i] || 0;
		t = testParts[i] || 0;
		if( v !== t ){
			return ( v > t );
		}
	}
	return true;
}
981926
def version():
    '''
    
    '''
    cmd = ['znc', '--version']
    out = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    ret = out[0].split(' - ')
    return ret[0]
422580
def contains_version(self, version):
        """"""
        if len(self.bounds) < 5:
            # not worth overhead of binary search
            for bound in self.bounds:
                i = bound.version_containment(version)
                if i == 0:
                    return True
                if i == -1:
                    return False
        else:
            _, contains = self._contains_version(version)
            return contains

        return False
693136
def check_version(version_)
      v = version
      f = false
      if v.kind_of?(Hash) && v.include?("version") &&
          v['version'] >= "#{version_}" then
	f = true
      end

      [f, v['version']]
    end
972736
def check_isis_version(major, minor=0, patch=0):
    """"""
    if ISIS_VERSION and (major, minor, patch) <= ISIS_VERISON_TUPLE:
        return

    msg = 'Version %s.%s.%s of isis required (%s found).'
    raise VersionError(msg % (major, minor, patch, ISIS_VERSION))
825821
def guess_version(pkg_key, default='?'):
    
    try:
        m = import_module(pkg_key)
    except ImportError:
        return default
    else:
        return getattr(m, '__version__', default)
75614
def check_version(cls):
        """"""
        super(SimpleCpnrDriver, cls).check_version()
        model.configure_pnr()
        cls.recover_networks()
        ver = model.get_version()
        if ver < cls.MIN_VERSION:
            LOG.warning("CPNR version does not meet minimum requirements, "
                        "expected: %(ever)f, actual: %(rver)f",
                        {'ever': cls.MIN_VERSION, 'rver': ver})
        return ver
424394
def version_is_valid(version_str):
    
    try:
        packaging.version.Version(version_str)
    except packaging.version.InvalidVersion:
        return False
    return True
933255
def detect_version():
    """"""
    version_regex = re.compile(r'\(PostgreSQL\) (?P<major>\d)\.(?P<minor>\d)\.(?P<bugfix>\d)')
    pg_version = None
    with hide('running', 'stdout', 'stderr'):
        output = run('psql --version')
    match = version_regex.search(output)
    if match:
        result = match.groupdict()
        if 'major' in result and 'minor' in result:
            pg_version = u'%(major)s.%(minor)s' % result
    if not pg_version:
        abort(u"Error: Could not determine Postgres version of the server.")
    return pg_version
605886
def check_version():
    
    import requests
    r = requests.get('https://pypi.python.org/pypi/intern/json').json()
    r = r['info']['version']
    if r != __version__:
        print("You are using version {}. A newer version of intern is available: {} ".format(__version__, r) +
              "\n\n'pip install -U intern' to update.")
    return r
849727
def VERSION(self):
        """"""
        return int(re.match(r'^(\D+)(\d+)$', self.__class__.__name__).group(2))
966176
def version(self):
        """"""
        if not self.__version:
            command = (self.name, '--version')
            logger.debug(command)
            stdout, _ = subprocess.Popen(
                command, stdout=subprocess.PIPE).communicate()
            version_output = str(stdout)
            match = re.search(self.version_patt, version_output)
            if match is None:
                raise ServersError(
                    'Could not determine version of %s from string: %s'
                    % (self.name, version_output))
            version_string = match.group('version')
            self.__version = tuple(map(int, version_string.split('.')))
        return self.__version
583261
def _check_ver(pyver, op, wanted):
    '''
    
    '''
    pyver = distutils.version.LooseVersion(pyver)
    wanted = distutils.version.LooseVersion(wanted)
    return getattr(operator, '__{}__'.format(op))(pyver, wanted)
875310
def check_version_consistency(self):
        

        version = None
        releaser_name = None

        for releaser in self.releasers:
            try:
                next_version = releaser.determine_current_version()
            except NotImplementedError:
                continue

            if next_version and version and version != next_version:
                raise Exception('Inconsistent versions, {} is at {} but {} is at {}.'.format(
                                releaser_name, version, releaser.name, next_version))

            version = next_version
            releaser_name = releaser.name
912324
def check_version(url=VERSION_URL):
    """"""
    for line in get(url):
        if 'release:' in line:
            return line.split(':')[-1].strip(' \'"\r\n')
1310486
def get_version():
    """"""
    import ast

    with open(os.path.join("cyvcf2", "__init__.py"), "r") as init_file:
      module = ast.parse(init_file.read())

    version = (ast.literal_eval(node.value) for node in ast.walk(module)
         if isinstance(node, ast.Assign)
         and node.targets[0].id == "__version__")
    try:
      return next(version)
    except StopIteration:
          raise ValueError("version could not be located")