import struct


def words_from_string(s, padding_byte = chr(255)):
    """A common conversion to give a list of integers from a little endian string.
    Uses the indicated padding byte if the string isn't a word multiple.
    """
    residual = len(s) & 3
    if residual:
        s += padding_byte * (4 - residual)
    return struct.unpack('<%dI' % (len(s)/4), s)