def gen_latin1(length=10):

    # Validate length argument
    _is_positive_int(length)

    range0 = range1 = range2 = []
    range0 = ['00C0', '00D6']
    range1 = ['00D8', '00F6']
    range2 = ['00F8', '00FF']
    output_array = []

    for i in range(int(range0[0], 16), int(range0[1], 16)):
        output_array.append(i)
    for i in range(int(range1[0], 16), int(range1[1], 16)):
        output_array.append(i)
    for i in range(int(range2[0], 16), int(range2[1], 16)):
        output_array.append(i)

    random.seed()

    if sys.version_info[0] == 2:
        output_string = u''.join(
            # pylint:disable=E0602
            unichr(random.choice(output_array)) for _ in range(length)
        )
    else:
        output_string = u''.join(
            chr(random.choice(output_array)) for _ in range(length)
        )

    return _make_unicode(output_string)
Returns a random string made up of UTF-8 characters.
dataset/ETHPy150Open omaciel/fauxfactory/fauxfactory/__init__.py/gen_latin1