cffi_utils/py2to3.py
def get_rand_str(encoding='latin1', l=64, avoid=[]):
    '''
    encoding-->str: one of ENCODINGS
    l-->int: length of returned str
    avoid-->list of int: to void (unprintable chars etc)
    Returns-->unicode str of the requested encoding
    '''
    ret = unicode('')
    while len(ret) < l:
        rndint = get_rand_int(encoding=encoding, avoid=avoid)
        ret += unichr(rndint)
    return ret
def get_rand_str(encoding='latin1', l=64, avoid=[]):
    '''
    encoding-->str: one of ENCODINGS
    l-->int: length of returned str
    avoid-->list of int: to void (unprintable chars etc)
    Returns-->unicode str of the requested encoding
    '''
    ret = unicode('')
    while len(ret) < l:
        rndint = get_rand_int(encoding=encoding, avoid=avoid)
        ret += unichr(rndint)
    return ret
def get_rand_str ( encoding = 'latin1' , l = 64 , avoid = [ ] ) : ret = unicode ( '' ) while len ( ret ) < l : rndint = get_rand_int ( encoding = encoding , avoid = avoid ) ret += unichr ( rndint ) return ret
encoding-->str: one of ENCODINGS
    l-->int: length of returned str
    avoid-->list of int: to void (unprintable chars etc)
    Returns-->unicode str of the requested encoding
encoding -- > str : one of ENCODINGS l -- > int : length of returned str avoid -- > list of int : to void ( unprintable chars etc ) Returns -- > unicode str of the requested encoding