def write_stream(script, output='trans'):
    """
    :param script: Translated Text
    :type script: Iterable

    :param output: Output Type (either 'trans' or 'translit')
    :type output: String
    """
    first    = operator.itemgetter(0)
    sentence, _ = script
    printer  = partial(print, file=sys.stdout, end='')

    for line in sentence:
        if isinstance(first(line), str):
            printer(first(line))
        else:
            printer(first(line).encode('UTF-8'))

    printer('\n')

    return sys.stdout.flush()
def write_stream(script, output='trans'):
    """
    :param script: Translated Text
    :type script: Iterable

    :param output: Output Type (either 'trans' or 'translit')
    :type output: String
    """
    first    = operator.itemgetter(0)
    sentence, _ = script
    printer  = partial(print, file=sys.stdout, end='')

    for line in sentence:
        if isinstance(first(line), str):
            printer(first(line))
        else:
            printer(first(line).encode('UTF-8'))

    printer('\n')

    return sys.stdout.flush()
def write_stream ( script , output = 'trans' ) : first = operator . itemgetter ( 0 ) sentence , _ = script printer = partial ( print , file = sys . stdout , end = '' ) for line in sentence : if isinstance ( first ( line ) , str ) : printer ( first ( line ) ) else : printer ( first ( line ) . encode ( 'UTF-8' ) ) printer ( '\n' ) return sys . stdout . flush ( )
:param script: Translated Text
    :type script: Iterable

    :param output: Output Type (either 'trans' or 'translit')
    :type output: String
: param script : Translated Text : type script : Iterable