472,780 Members | 1,169 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

CGI vs WSGI

Dear all,

what is the difference? Middleware?

I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.

Thanks.

Jul 4 '07 #1
3 4415
On Jul 4, 2:49 pm, tuom.lar...@gmail.com wrote:
Dear all,

what is the difference? Middleware?
Yes, and also the fact that you have a large choice of WSGI web
frameworks to choose
from. CGI looks so much 20th century ... ;)
Michele Simionato
Jul 4 '07 #2
tu*********@gmail.com wrote:
I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.
CGI starts up a new process for every request, using stdin/stdout for
passing information. I believe WSGI can do that, but I believe it can
also do in-process requests (think mod_python, only with a Python web
server), external process requests (think FastCGI or LRWP), etc.

I could certainly be mistaken, it's been a while since I looked into any
of it.

- Josiah
Jul 4 '07 #3
tu*********@gmail.com a écrit :
Dear all,

what is the difference? Middleware?

I'm wondering because the only variables I ever needed were PATH_INFO,
REQUEST_METHOD, QUERY_STRING and maybe one more, all of which should
be available from CGI, too.

Thanks.
WSGI is intented as a gateway between a web server and a long-running
python application. Which means you don't have to launch a new Python
interpreter, import libs, parse config, connect to the database etc etc
for each and every request.

Also, it's (IMHO) much more usable than CGI.
Jul 4 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Thomas W | last post by:
Will there be a WSGI-server like BaseHTTPServer etc in the standard distro? I think that would increase the adoptation of the WSGI-standard. A new web-framework for python pops up every other week...
2
by: Ben Finney | last post by:
Howdy all, I'm trying to implement some new functionality for an existing PHP web application. Rather than writing a whole lot of stuff in PHP, and looking toward a future when more of the...
1
by: seberino | last post by:
I love idea of WSGI and hope it succeeds. It seems to be helpful for person tempted to write his own framework.....they can now just mix and match existing components with WSGI //instead//. I...
11
by: Gregory Piñero | last post by:
So I keep hearing more and more about this WSGI stuff, and honestly I still don't understand what it is exactly and how it differs from CGI in the fundamentals (Trying to research this on the web...
7
by: Ben Finney | last post by:
Howdy all, I'm working on a web application that is starting to gain a lot of back-end code written in Python. However, all the current interface code is written in legacy PHP. I'd like to...
2
by: Adam Atlas | last post by:
I'm trying to figure out if there's any defined behaviour in PEP 333 for instances where an application returns an iterable as usual without error, but that iterable's next() method eventually...
8
by: Ron Garret | last post by:
The wsgiref module in Python 2.5 seems to be empty: $ python Python 2.5 (r25:51908, Mar 1 2007, 10:09:05) on darwin Type "help", "copyright", "credits" or "license" for more information. ...
37
by: Michele Simionato | last post by:
At work we are shopping for a Web framework, so I have been looking at the available options on the current market. In particular I have looked at Paste and Pylons and I have written my...
9
by: Tool69 | last post by:
Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article "Why so many Python web...
4
by: inhahe | last post by:
I'm sorry if this is off-topic, i couldn't find a mailing list OR forum for WSGI (and #wsgi wasn't very helpful). i played around with StringIO, and apparently if you write to a stringio the...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.