
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 France License.
So one day you're too lazy to write a fcgi library for your favorite language but you want nonetheless expose an application on the web... Then use python ! There are quite a few frameworks to run fcgi with python, but if you want something easy, I think that flup is for you.
The code below takes care of few aspects for you. First flup span a server talking at port 5555 on localhost. You can configure it to be multi thread is you want to. Then using the cgi module we make sure that the input is clean and ready to use. Finally we run your fantastic application as DOSOMETHING. If your application is a simple program, of course there is no reason to write a fcgi. A common cgi will pay the bill. However, if your application can benefit from some form of caching, then maybe writing the web related stuff in python and use the application as a black box can be a nice idea.
If might want to check out [flup http://trac.saddi.com/flup] and [werkzeug http://werkzeug.pocoo.org/]. I've not used the last one, but it seems more complete then flup.
Recent comments
3 weeks 2 days ago
23 weeks 4 days ago
1 year 24 weeks ago
1 year 28 weeks ago
1 year 40 weeks ago
1 year 42 weeks ago
1 year 44 weeks ago
1 year 47 weeks ago
1 year 48 weeks ago
2 years 26 weeks ago