def str2intlist(data, intsize=4):
 result = []
 data = decode_string_escape(data)[::(-1)]
 l = len(data)
 data = ((('\x00' * (intsize - (l % intsize))) + data) if ((l % intsize) != 0) else data)
 for i in range(0, l, intsize):
  if (intsize == 8):
   val = struct.unpack('>Q', data[i:(i + intsize)])[0]
  else:
   val = struct.unpack('>L', data[i:(i + intsize)])[0]
  result = ([val] + result)
 return result

def str2intlist ( data , intsize = 4 ) : result = [ ] data = decode_string_escape ( data ) [ : : ( - 1 ) ] l = len ( data ) data = ( ( ( '\x00' * ( intsize - ( l % intsize ) ) ) + data ) if ( ( l % intsize ) != 0 ) else data ) for i in range ( 0 , l , intsize ) : if ( intsize == 8 ) : val = struct . unpack ( '>Q' , data [ i : ( i + intsize ) ] ) [ 0 ] else : val = struct . unpack ( '>L' , data [ i : ( i + intsize ) ] ) [ 0 ] result = ( [ val ] + result ) return result
convert a string to list of int .