code: def compare_version(a, b):
    
    aa = string.split(a, ".")
    bb = string.split(b, ".")
    for i in range(0, 4):
      if aa[i] != bb[i]:
        return cmp(int(aa[i]), int(bb[i]))
    return 0
docs: Compare two version number strings of the form W.X.Y.Z.
  
    The numbers are compared most-significant to least-significant.
    For example, 12.345.67.89 > 2.987.88.99.
  
    Args:
      a: First version number string to compare
      b: Second version number string to compare
  
    Returns:
      0 if the numbers are identical, a positive number if 'a' is larger, and
      a negative number if 'b' is larger.