> I'm not sure what you mean in the second option

I meant that you could:
"... even leave the filelike object which receives the fpdf output open and 
use that instead as attachment input without the need to write to the 
filesystem ..."

> when you say filelike object what are you referring to?

http://docs.python.org/2/glossary.html#term-file-object

> attachments = mail.Attachment(pdf, filename='sample.pdf'))

What does pdf contain?

For creating the attachments, this should work for App Engine:

You should be allowed to get the fpdf output as a string with something like

pdfasastring = fpdfobject.output(dest="S")

Then store this output with a file-like object

import StringIO
sio = StringIO.StringIO()

Now store the pdf string on the StringIO object

sio.write(pdfasastring)

Perhaps you need to return the seek position in case that the Attachment 
class uses the .read() method
sio.seek(0)

Then, you supposedly can add an attachment with:

mail.Attachment(sio, filename="mandatory.ext")


-- 

--- 
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/groups/opt_out.


Reply via email to