You can use the csv and cStringIO modules to generate the "file" and then just set the appropriate content type and disposition headers before you return the contents and the user's browser will download the generated file. Take a look at this post for more details: https://groups.google.com/d/msg/web2py/4QhEULmJ8YE/aNBcJv81RocJ
On Friday, May 3, 2013 8:59:54 AM UTC-5, Lamps902 wrote: > > I would like to permit users to be able to download a text file of some > data that's pulled up from certain fields of a DB table. This text file > should be generated when the user clicks on a certain link, and should not > be stored on the server's HD. Any ideas as to how to go about doing this? > Thanks! > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.