print f.write(line.xml()) the xml function returns a string which is the xml representation of the helper object.
-Thadeus On Wed, Jan 27, 2010 at 11:24 AM, Wes James <compte...@gmail.com> wrote: > What is the best way to put this in to a variable so I can output it > in a view and write it to a file: > > line=XML('<ul><li>Name:' + {{=schol.name}} + '</li></ul>') > > {{=line}} > > {{f = open('/tmp/workfile', 'w') > print f.write(line) > }} > > > line=XML() is not plain text is it? just can't do f.write on it - hmm > looking at the manual it looks like I can. > > ??? not sure where I should write this file while rendering view - > /tmp should be ok, right? > > -wes > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.