def version_to_list(version):
 ver_list = []
 for p in version.split(u'.'):
  try:
   n = int(p)
  except ValueError:
   n = p
  ver_list.append(n)
 return ver_list

def version_to_list ( version ) : ver_list = [ ] for p in version . split ( u'.' ) : try : n = int ( p ) except ValueError : n = p ver_list . append ( n ) return ver_list
convert a version string to a list of numbers or strings .