On 23/03/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 04:52 PM 3/22/2007 +, Alan Kennedy wrote:
> >But if the users want their "modern" python applications to be
> >portable everywhere on WSGI, e.g. returning (iterable) files as ouput,
>
> Actually, returning a file as output is a horribl
Graham Dumpleton wrote:
>> As an avid use of "print" for debugging, this would bug me. I would
>> prefer just avoiding the CGI case where stdout goes to the client, and
>> otherwise saying that the server should try to put stdout output
>> someplace where it can be read. But it could very well be
Thanks for all the input, gives me some things to think about.
On 23/03/07, Ian Bicking <[EMAIL PROTECTED]> wrote:
> Graham Dumpleton wrote:
> > In the case of sys.stdout, do people see it as being at least good
> > practice, if not required by specification, that the WSGI adapter
> > should ensur
At 04:52 PM 3/22/2007 +, Alan Kennedy wrote:
>But if the users want their "modern" python applications to be
>portable everywhere on WSGI, e.g. returning (iterable) files as ouput,
Actually, returning a file as output is a horrible idea, since it will
massively reduce throughput, due to trans
[Alan Kennedy]
>>Strictly speaking, WSGI requires python 2.2,
>>because of iterators.
[Phillip J. Eby]
> Actually, it doesn't. The pre-2.2 iterator protocol is to be used in such
> cases:
>
> http://www.python.org/dev/peps/pep-0333/#supporting-older-2-2-versions-of-python
Dang! I knew I couldn't
Graham Dumpleton wrote:
> When one is using CGI as a means of implementing a WSGI application,
> although one would return content through the iterable returned from
> the application or by calling write() method returned from
> start_response(), one could actually write to sys.stdout directly as
>
At 11:29 AM 3/22/2007 +, Alan Kennedy wrote:
>Strictly speaking, WSGI requires python 2.2,
>because of iterators.
Actually, it doesn't. The pre-2.2 iterator protocol is to be used in such
cases:
http://www.python.org/dev/peps/pep-0333/#supporting-older-2-2-versions-of-python
__
Graham,
I thought I'd reply, so that we'd get replies from everyone else to
tell me I'm wrong.
All your points are good common-sense stuff. I think that all of your
policies on stdin, stdout, and stderr are good, and are appropriate
for a WSGI environment running inside an Apache server.
Some sm
When one is using CGI as a means of implementing a WSGI application,
although one would return content through the iterable returned from
the application or by calling write() method returned from
start_response(), one could actually write to sys.stdout directly as
well since that is where the WSGI