def xxd(shift, data, bytes_per_line, bytes_per_sentence):
 current = 0
 for current in xrange(0, len(data), bytes_per_line):
  line = data[current:(current + bytes_per_line)]
  line_printable = mask_not_alphanumeric(line)[1]
  line_ordinals = map(ord, line)
  offsets = range(0, len(line_ordinals), bytes_per_sentence)
  line_ordinal_words = [line_ordinals[x:(x + bytes_per_sentence)] for x in offsets]
  (yield ((shift + current), line_ordinal_words, line_printable))

def xxd ( shift , data , bytes_per_line , bytes_per_sentence ) : current = 0 for current in xrange ( 0 , len ( data ) , bytes_per_line ) : line = data [ current : ( current + bytes_per_line ) ] line_printable = mask_not_alphanumeric ( line ) [ 1 ] line_ordinals = map ( ord , line ) offsets = range ( 0 , len ( line_ordinals ) , bytes_per_sentence ) line_ordinal_words = [ line_ordinals [ x : ( x + bytes_per_sentence ) ] for x in offsets ] ( yield ( ( shift + current ) , line_ordinal_words , line_printable ) )
a generator of strings .