#NEWLINE# def split_version( version ) : #NEWLINE# #INDENT# find_digits = re . compile ( '([0-9]+)(.*)' ) . match #NEWLINE# l = [ ] #NEWLINE# for part in version . split ( '.' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# l . append ( int ( part ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# match = find_digits ( part ) #NEWLINE# if match : #NEWLINE# #INDENT# l . append ( int ( match . group ( 1 ) ) ) #NEWLINE# l . append ( match . group ( 2 ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return tuple ( part )