[mod_python] WSGI server

Damjan gdamjan at mail.net.mk
Sat Apr 1 18:29:16 EST 2006

> >  2. I've found a passthrough file wrapper "plays nicer" with large
> > applications than a tempfile. YMMV.
> Yeah, I have seen this mostly implemented that way and considered it.  The
> main problem I have is that the spec says that wsgi.input is a file "like"
> object.  A passthru wrapper doesn't let me seek or tell, and if you're

There's a list of methods that wsgi.input and wsgi.error MUST support
http://www.python.org/dev/peps/pep-0333/#id19 and seek and tell are not
listed. Also PEP-333 FORBIDS calling any other methods of those objects.

> supporting large POST requests (e.g. file uploads), then a StringIO isn't
> going to cut it.  I see where a passthru can be more efficient, but I prefer
> the flexibility of the tempfile implementation.  You could put tempfiles on
> a tmpfs mount, if you were interested in improving performance.

I must say, I don't like temp files. They pollute /tmp, so I'd want to
configure where temp files are located, which means additional
administration effort. But that's just my 0.02.

damjan | дамјан
This is my jabber ID -->         damjan at bagra.net.mk 
 -- not my mail address, it's a Jabber ID --^ :)

More information about the Mod_python mailing list