[Moin-user] Res: Help on macro.formatter

Marcão marcoalher at yahoo.com.br
Wed Sep 12 13:11:05 EDT 2007


Hi Ted and All

The '\n' in the expression 'return macro.formatter.text("%s\n" % (lista))' does not work because the 'new line' is put only in the lista's end, not inside it.

I also tried the following:

    lista = "aaa bbb ccc ddd"
    lre = re.compile(' ')
    listafinal = lre.sub('\n',lista)
    return macro.formatter.text("%s" % (listafinal))

But it still does not work, although it works in the following code:

    lista = "aaa bbb ccc ddd eee kkk"
    lre = re.compile(' ')
    x = lre.sub('\n',lista)
    print x

    The result of it is:
    aaa
    bbb
    ccc
    ddd
    kkk

So i think que problem is how the Moin Engine works with '\n'.

Is there a way to send a html code directly to a wiki's page ?

So I could send some thing like "<br>aaa</br><br>bbb</br><br>ccc</br>"

Thanks

Marco




----- Mensagem original ----
De: Ted Stern <dodecatheon at gmail.com>
Para: Marcão <marcoalher at yahoo.com.br>
Enviadas: Terça-feira, 11 de Setembro de 2007 19:15:46
Assunto: Re: [Moin-user] Help on macro.formatter

On 11 Sep 2007 12:58:10 -0700, Marcão wrote:
>
> Hi All.
>
> I'm new in Moin and Python and I'm facing some problems that I think is very simple.
>
> I have a list "aaa bbb ccc ddd eee" that I print with this command: 
>
>     lista = "aaa bbb ccc ddd eee"
>     return macro.formatter.text("%s" % (lista))

What happens if you put "%s\n" instead?

>
> The result is:
>
>     aaa bbb ccc ddd eee
>
> But I need to print this like:
>
>     aaa
>     bbb
>     ccc
>     ddd
>     eee
>
>
> I don't know how to print like this.
> Could someone help me ?
>
> Thanks
>
> Marco
>
>
>
>
>       Flickr agora em português. Você clica, todo mundo vê.
> http://www.flickr.com.br/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
>

-- 
 dodecatheon at gmail dot com
 Frango ut patefaciam -- I break so that I may reveal





      Flickr agora em português. Você clica, todo mundo vê.
http://www.flickr.com.br/




More information about the Moin-user mailing list