def get_seq_number(name):
 (head, tail) = os.path.splitext(name)
 if (tail == '.ts'):
  (match, set, num) = match_ts(name)
 else:
  num = tail[1:]
 if num.isdigit():
  return int(num)
 else:
  return 0

def get_seq_number ( name ) : ( head , tail ) = os . path . splitext ( name ) if ( tail == '.ts' ) : ( match , set , num ) = match_ts ( name ) else : num = tail [ 1 : ] if num . isdigit ( ) : return int ( num ) else : return 0
return sequence number if name as an int .