def email_quote_txt(text,
                    indent_txt='>>',
                    linebreak_input="\n",
                    linebreak_output="\n"):
    """
    Takes a text and returns it in a typical mail quoted format, e.g.::
        C'est un lapin, lapin de bois.
        >>Quoi?
        Un cadeau.
        >>What?
        A present.
        >>Oh, un cadeau.

    will return::
        >>C'est un lapin, lapin de bois.
        >>>>Quoi?
        >>Un cadeau.
        >>>>What?
        >>A present.
        >>>>Oh, un cadeau.

    @param text: the string to quote
    @param indent_txt: the string used for quoting (default: '>>')
    @param linebreak_input: in the text param, string used for linebreaks
    @param linebreak_output: linebreak used for output
    @return: the text as a quoted string
    """
    if (text == ""):
        return ""
    lines = text.split(linebreak_input)
    text = ""
    for line in lines:
        text += indent_txt + line + linebreak_output
    return text
def email_quote_txt ( text , indent_txt = '>>' , linebreak_input = "\n" , linebreak_output = "\n" ) : if ( text == "" ) : return "" lines = text . split ( linebreak_input ) text = "" for line in lines : text += indent_txt + line + linebreak_output return text
Takes a text and returns it in a typical mail quoted format, e.g.::
        C'est un lapin, lapin de bois.
        >>Quoi?
        Un cadeau.
        >>What?
        A present.
        >>Oh, un cadeau.

    will return::
        >>C'est un lapin, lapin de bois.
        >>>>Quoi?
        >>Un cadeau.
        >>>>What?
        >>A present.
        >>>>Oh, un cadeau.

    @param text: the string to quote
    @param indent_txt: the string used for quoting (default: '>>')
    @param linebreak_input: in the text param, string used for linebreaks
    @param linebreak_output: linebreak used for output
    @return: the text as a quoted string