def convert_version(text):
 version = 0
 test = True
 m = RE_VERSION.search(text)
 if m:
  version = (((int(m.group(1)) * 1000000) + (int(m.group(2)) * 10000)) + (int(m.group(3)) * 100))
  try:
   if (m.group(4).lower() == 'rc'):
    version = (version + 80)
   elif (m.group(4).lower() == 'beta'):
    version = (version + 40)
   version = (version + int(m.group(5)))
  except:
   version = (version + 99)
   test = False
 return (version, test)

def convert_version ( text ) : version = 0 test = True m = RE_VERSION . search ( text ) if m : version = ( ( ( int ( m . group ( 1 ) ) * 1000000 ) + ( int ( m . group ( 2 ) ) * 10000 ) ) + ( int ( m . group ( 3 ) ) * 100 ) ) try : if ( m . group ( 4 ) . lower ( ) == 'rc' ) : version = ( version + 80 ) elif ( m . group ( 4 ) . lower ( ) == 'beta' ) : version = ( version + 40 ) version = ( version + int ( m . group ( 5 ) ) ) except : version = ( version + 99 ) test = False return ( version , test )
convert version string to numerical value and a testversion indicator .