def get_major_version(version=None):
 version = get_complete_version(version)
 parts = (2 if (version[2] == 0) else 3)
 major = u'.'.join((str(x) for x in version[:parts]))
 return major

def get_major_version ( version = None ) : version = get_complete_version ( version ) parts = ( 2 if ( version [ 2 ] == 0 ) else 3 ) major = u'.' . join ( ( str ( x ) for x in version [ : parts ] ) ) return major
returns major version from version .