Pros/Cons of Turbogears/Rails?

Jonathan Ellis jbellis at gmail.com
Sun Aug 27 19:13:29 EDT 2006


Fredrik Lundh wrote:
> kenneth.m.mcdonald at sbcglobal.net wrote:
> > P.S. If I wanted to provide an image by streaming the
> > file data directly over the connection, rather than by
> > referring to an image file, how would I do that? I'd
> > like to build code that would allow images to be assembled
> > into a single-file photo album (zip or bsddb file), and
> > so can't refer to them as individual image files.
>
> some browsers support special data URL:s for images, but that doesn't
> work well for large images, and isn't portable.  on the other hand, I
> don't really see why there has to be 1:1 mapping between URL:s and image
> files on your machine, especially if you're using a web application
> framework...

I think he's just asking "how do you specify a mimetype and stream
binary data from within the framework."  IIANM in TurboGears all you
have to do is return a file-like object from your page handler.

-Jonathan




More information about the Python-list mailing list