Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Graham Dumpleton
On 5 January 2011 07:04, James Y Knight wrote: > Back to the subject of this thread: A simple CGI server is useful because > it's simple enough that you can include it in the spec, to demonstrate how to > handle various bits of WSGI. And anyone writing a webserver understands CGI, > and can und

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread James Y Knight
On Jan 4, 2011, at 1:24 PM, Antoine Pitrou wrote: > (for the record, the leading Web scripting language, PHP, has moved away from > CGI and standardized on mod_php eons ago) Yet also still offers a cgi if you want to use that instead. CGI is a wonderful lowest-common-denominator. It's a great opt

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread hidura
Right. Note that App Engine does not copy the full CGI mechanism -- it doesn't start a new process for each request. But it does use os.environ to set the request parameters for each request. However, in practice, all but the simplest test apps use a custom WSGI bridge, and we are considering drop

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Hidura
I used wsgi and have my app on a shared server and runs excelent, better than if was using cgi, that cause me a lot of headache with the incompatiblities with Py3k. 2011/1/4, Eric Larson : > At Tue, 4 Jan 2011 17:19:48 + (UTC), > Antoine Pitrou wrote: >> >> P.J. Eby writes: >> > >> > At 12:43

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Guido van Rossum
On Tue, Jan 4, 2011 at 7:53 AM, P.J. Eby wrote: > At 12:43 PM 1/4/2011 +, Antoine Pitrou wrote: >> Alice Bevan­McGregor writes: > > [1] http:://bit.ly/e7rtI6 So, >> while we are at it, could we get rid of the "CGI server example" in this new >> SWGI spec? This is 2011, and we should promote m

Re: [Web-SIG] [Python-Dev] PEP 3333: wsgi_string() function

2011-01-04 Thread Guido van Rossum
On Tue, Jan 4, 2011 at 8:22 AM, Tres Seaver wrote: > Note that Guido just recently wrote on that list that he considers that > PEP to be de facto accepted. That was conditional on there not being any objections in the next 24 hours. There have been plenty, so I'm retracting that. -- --Guido van

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread Guido van Rossum
On Tue, Jan 4, 2011 at 7:48 AM, P.J. Eby wrote: > At 06:30 PM 1/3/2011 -0800, Guido van Rossum wrote: >> >> Would >> >>  sys.stdout.buffer.write(b'abc') >> >> do? >> >> (If you mix this with writing strings to sys.stdout directly, you may >> have to call sys.stdout.flush() first.) > > The current

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Klaus Bremer
CGI may be old fashioned, but in my opinion Ron got the point. And for simple applications CGI is fast enough. I don't want to miss this option. Klaus. -- Am 04.01.2011 um 18:57 schrieb hid...@gmail.com: > Because CGI is an old fashion way to make the things and is very different > from the

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Antoine Pitrou
Eric Larson writes: > It is important to recognize that "production" doesn't necessarily > have to be some ultra powerful server somewhere that is central to > some organization. A simple server running Apache with CGI is just as > valid a production environment as an EC2 cluster. This is especial

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Eric Larson
At Tue, 4 Jan 2011 17:19:48 + (UTC), Antoine Pitrou wrote: > > P.J. Eby writes: > > > > At 12:43 PM 1/4/2011 +, Antoine Pitrou wrote: > > >Alice Bevan­McGregor writes: > > [1] > > >http:://bit.ly/e7rtI6 So, while we are at it, could we get rid of > > >the "CGI server example" in this

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread hidura
CGI is by far the quickest and easiest way to write and deploy very simple web site scripts. As you move to improve Python for important industrial strength web programming, why not also continue to support quick and dirty web interactivity scripts? Because CGI is an old fashion way to make t

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Ron Stephens
CGI is by far the quickest and easiest way to write and deploy very simple web site scripts. As you move to improve Python for important industrial strength web programming, why not also continue to support quick and dirty web interactivity scripts? Ron Stephens Sent from my iPhone On Jan 4,

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Antoine Pitrou
P.J. Eby writes: > > At 12:43 PM 1/4/2011 +, Antoine Pitrou wrote: > >Alice Bevan­McGregor writes: > > [1] > >http:://bit.ly/e7rtI6 So, while we are at it, could we get rid of > >the "CGI server example" in this new SWGI spec? This is 2011, and we > >should promote modern idioms, not enco

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread P.J. Eby
At 08:53 PM 1/4/2011 +1100, Graham Dumpleton wrote: BTW, to what extent are the examples in the PEP meant to be able to work on both Python 2.X and Python 3.X as is. Does it need to be clarified where examples will only work on Python 3.X, in particular the CGI gateway. The intention is that P

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread P.J. Eby
At 09:51 PM 1/4/2011 +1100, Graham Dumpleton wrote: Add another point. FWIW, these are coming up because of questions being asked on python-dev IRC channel about PEP . The issue as it came down to was that the PEP may not be clear enough in explaining that where str() is unicode and as such

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread P.J. Eby
At 12:43 PM 1/4/2011 +, Antoine Pitrou wrote: Alice Bevan­McGregor writes: > > [1] http:://bit.ly/e7rtI6 So, while we are at it, could we get rid of the "CGI server example" in this new SWGI spec? This is 2011, and we should promote modern idioms, not encourage people to do 1995 Web progr

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread P.J. Eby
At 06:30 PM 1/3/2011 -0800, Guido van Rossum wrote: Would sys.stdout.buffer.write(b'abc') do? (If you mix this with writing strings to sys.stdout directly, you may have to call sys.stdout.flush() first.) The current code is: sys.stdout.write(data) # TODO: this needs to be bin

Re: [Web-SIG] CGI in PEP 444

2011-01-04 Thread Hidura
Agree, i develop an excelent wsgi server in Py3k, without use the cgi library to extract the data, so is better if in the manual kills the part that indicate use the cgi lib to extract the data. 2011/1/4, Antoine Pitrou : > Alice Bevan–McGregor writes: >> >> [1] http://bit.ly/e7rtI6 > > So, while

[Web-SIG] CGI in PEP 444

2011-01-04 Thread Antoine Pitrou
Alice Bevan–McGregor writes: > > [1] http://bit.ly/e7rtI6 So, while we are at it, could we get rid of the "CGI server example" in this new SWGI spec? This is 2011, and we should promote modern idioms, not encourage people to do 1995 Web programming. 10 years ago, CGI was already frown upon. (and

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread Graham Dumpleton
Add another point. FWIW, these are coming up because of questions being asked on python-dev IRC channel about PEP . The issue as it came down to was that the PEP may not be clear enough in explaining that where str() is unicode and as such something like PATH_INFO, although unicode, is actuall

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)

2011-01-04 Thread Graham Dumpleton
BTW, to what extent are the examples in the PEP meant to be able to work on both Python 2.X and Python 3.X as is. Does it need to be clarified where examples will only work on Python 3.X, in particular the CGI gateway. Graham On 4 January 2011 16:49, Graham Dumpleton wrote: > On 4 January 2011