import six


def byte(integer):
    """
    Convert integer to a one-character byte-string

    Similar to chr(), except in Python 3 produce bytes() not str()
    Same as pack_integer(integer, num_bytes=1)
    """
    return six.binary_type(bytearray((integer,)))