Thank you Robert and Dave. I did the folowing:
commandoutput = "aaa bbb ccc ddd" lista = commandoutput.split(' ') for i in lista: result.append(macro.formatter.rawHTML('<p> %s </p>' %i)) return "\n".join(result) And, then, I got the result: aaa bbb ccc ddd I read something saying we should avoid using the macro.formatter.rawHTML, but my wiki is used for few people, and none of then knows what is a macro :) Kind Regards, Marco ----- Mensagem original ---- De: Robert Seeger (OR Soft) <[EMAIL PROTECTED]> Para: moin-user <moin-user@lists.sourceforge.net> Enviadas: Quinta-feira, 13 de Setembro de 2007 5:49:00 Assunto: Re: [Moin-user] Res: Help on macro.formatter This is not recommended. You should try to avoid injecting raw HTML unless it is some complicated, non-standard stuff. Use the formatter API for all output. In your case iterate over the list, use fomatter.text() and formatter.linebreak(preformatted=1). See MoinMoin\formatter\text_html.py for the formatter API Kind Regards, Robert > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 12, 2007 9:56 PM > To: moin-user > Subject: Re: [Moin-user] Res: Help on macro.formatter > > > Hi there > > You could use the "macro.formatter.rawHTML(string)". This will return > your html-code. > > bye > Marcel > > > to return html. But maybe need to be aware > Am Mittwoch, den 12.09.2007, 10:11 -0700 schrieb Marcão: > > 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 <[EMAIL PROTECTED]> > > Para: Marcão <[EMAIL PROTECTED]> > > 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@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/moin-user > > > > > > > > > ------------------------------------------------------------------------- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/moin-user