def _ver_from_ver_str(ver_str):
 ver = []
 for s in ver_str.split('.'):
  try:
   ver.append(int(s))
  except ValueError:
   ver.append(s)
 return tuple(ver)

def _ver_from_ver_str ( ver_str ) : ver = [ ] for s in ver_str . split ( '.' ) : try : ver . append ( int ( s ) ) except ValueError : ver . append ( s ) return tuple ( ver )
convert a version string to a version object as used internally for the "stdlibs" area of the database .