Oh, except, there's actually an interesting idea in there if you look really closely.
- But isn't that just calling a bunch of syscalls?
- But isn't that just moving a bunch of bytes around?The brilliant idea behind CGI is that you set a directory as your cgi-bin, drop an executable file, and then the webserver will run that executable and pass in a bunch of data from the request as environment variables and on STDIN, and then send STDOUT back to the browser. It's an incredibly powerful idea with a really simple implementation. You can write your scripts in any language, they can do anything, they can present further abstractions and run other scripts, they can embed other languages like Python or PHP or Haskell, and they can embed other frameworks like Django or Rails. And all you have to do is drop a file in a directory and make it executable. All because of the power of plain text: CGI "speaks" a uniform interface that any computer language can understand.
When I saw FuqIt, I thought of CGI because the brilliant idea behind FuqIt seems to be "Drop a Python file or Jinja template in a directory, and we'll call it via a uniform interface". Kinda like CGI, huh, except it's restricted to Python? (Actually, there's another standard - WSGI - that's built around the same principles as CGI but restricted to Python.)
Anyway, it is the start of an idea with a proclaimed possible direction (basic error handling, basic web server functionality). It doesn't do a lot right now (and maybe it never will) but it isn't just CGI.
base, ext = os.path.splitext(name[1:])