Re: [Web-SIG] Direct use of sys.stdout, sys.stderr and sys.stdin in WSGI application.

2007-03-22 Thread Phillip J. Eby
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

Re: [Web-SIG] Direct use of sys.stdout, sys.stderr and sys.stdin in WSGI application.

2007-03-22 Thread Ian Bicking
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

Re: [Web-SIG] Direct use of sys.stdout, sys.stderr and sys.stdin in WSGI application.

2007-03-22 Thread Phillip J. Eby
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

Re: [Web-SIG] Direct use of sys.stdout, sys.stderr and sys.stdin in WSGI application.

2007-03-22 Thread Graham Dumpleton
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 ensure that

[Web-SIG] Direct use of sys.stdout, sys.stderr and sys.stdin in WSGI application.

2007-03-21 Thread Graham Dumpleton
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