how about simpler?
from StringIO import StringIO
stream = StringIO("test for echo")
stream.write("oh crap")
stream.seek(0)
response.headers['Content-Type'] = 'text/plain;
charset=us-ascii'
response.headers['Content-disposition'] = 'attachment;
filename=hsDNA_%s_IQa.py' % (qry[0][1])
return response.write(stream.getvalue())
but it only puts the string "None" in the downloaded file. i've tried it
with cStringIO instead of StringIO, with and without the write method. i
just can't get those strings to come across.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.