Get version of current adb
        Return example:
            [u'1.0.32', u'1', u'0', u'32']
762138
def version(self):
        '''
        
        '''
        '''adb version'''
        match = re.search(r"(\d+)\.(\d+)\.(\d+)", self.run_cmd("version"))
        return [match.group(i) for i in range(4)]
402860
def version_tuple(self):
    """"""
    try:
      return tuple([int(digit, 10) for digit in self.version.split('.')])
    except (AttributeError, TypeError, ValueError):
      return None
1071742
def sdk_version(self):
        ''''''
        if self.__sdk == 0:
            try:
                self.__sdk = int(self.adb.cmd("shell", "getprop", "ro.build.version.sdk").communicate()[0].decode("utf-8").strip())
            except:
                pass
        return self.__sdk
1094931
def parse_version(str_):
    
    v = re.findall(r"\d+.\d+.\d+", str_)
    if v:
        return v[0]
    else:
        print("cannot parse string {}".format(str_))
        raise KeyError
706013
def _get_xml_version(element):
    """"""
    if "versions" in element.attrib:
        result = [ int(v) for v in re.split(",\s*", element.attrib["versions"]) ]
    else:
        result = [ 1 ]

    return result
1056623
def get_version():
    
    version = '.'.join((str(each) for each in VERSION[:3]))
    if len(VERSION) > 3:
        version += VERSION[3]
    return version
652970
def get_version(version):
    ""
    assert len(version) == 5
    assert version[3] in ('alpha', 'beta', 'rc', 'final')
    parts = 2 if version[2] == 0 else 3
    main = '.'.join(map(str, version[:parts]))
    sub = ''
    if version[3] == 'alpha' and version[4] == 0:
        git_changeset = get_git_changeset()
        if git_changeset:
            sub = '.dev%s' % git_changeset
    elif version[3] != 'final':
        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
        sub = mapping[version[3]] + str(version[4])
    return main + sub
562502
def get_version():
    
    # Get location of application wide version info
    root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__)))
    version_file = os.path.join(root_dir, 'safe', 'definitions', 'versions.py')
    fid = open(version_file)
    version = ''
    for line in fid.readlines():
        if line.startswith('inasafe_version'):
            version = line.strip().split(' = ')[1]
            version = version.replace('\'', '')
            break
    fid.close()
    if version:
        return version
    else:
        raise Exception('Version is not found in %s' % version_file)
1356057
def get_os_version(self, version_text):
        """"""
        os_version = None
        if version_text is None:
            return os_version
        match = re.search(self.version_re, version_text, re.MULTILINE)
        if match:
            os_version = match.group(1)

        return os_version
884469
def get_current_version(self, increment=None):
		
		ver = (
			self.get_tagged_version()
			or str(self.get_next_version(increment)) + '.dev0'
		)
		return str(ver)
1035807
def version():
    '''
    
    '''
    cmd = '{0} -v'.format(_detect_os())
    out = __salt__['cmd.run'](cmd).splitlines()
    ret = out[0].split(': ')
    return ret[1]
1138395
def versionString(version):
    
    ver = list(map(str, version))
    numbers, rest = ver[:2 if ver[2] == '0' else 3], ver[3:]
    return '.'.join(numbers) + '-'.join(rest)
1364991
def python_version():
    ''''''
    major, minor, patch = sys.version_info[0:3]
    return '{0}.{1}.{2}'.format(major, minor, patch)
513643
def get_version_text(self):
        """"""
        version_text = None

        try:
            version_text = self.device.send('uname -sr', timeout=10)
        except CommandError as exc:
            exc.command = 'show version'
            raise exc

        return version_text
809758
def get_version(self):
        """"""
        return mgz.const.VERSIONS[self._header.version], str(self._header.sub_version)[:5]
1013045
private static int findVersion(final ByteBuf buffer) {
        final int n = buffer.readableBytes();
        // per spec, the version number is found in the 13th byte
        if (n < 13) {
            return -1;
        }

        int idx = buffer.readerIndex();
        return match(BINARY_PREFIX, buffer, idx) ? buffer.getByte(idx + BINARY_PREFIX_LENGTH) : 1;
    }
1106006
def get_version(version):
    """"""
    if len(version) > 2 and version[2] is not None:
        if isinstance(version[2], int):
            str_version = "%s.%s.%s" % version[:3]
        else:
            str_version = "%s.%s_%s" % version[:3]
    else:
        str_version = "%s.%s" % version[:2]

    return str_version