
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
1 day 21 hours ago
4 days 17 hours ago
1 week 16 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 1 day ago
1 week 1 day ago
2 weeks 2 days ago
8 weeks 5 days ago
9 weeks 2 days ago